outline-server/.github/workflows/test.yml
Jonathan Cohen 48e52787a8
CI Updates (#804)
* Fix broken Travis config

* Doesn't also build the Linux or Mac manager on server deploy
* Correctly builds a Windows binary on manager release (although we still have to manually upload build artifacts)
* Renames the Shadowbox deployment step

* Run Linux unit tests on Github Actions

* Run manager tests on mac, linux, and windows

* Fix syntax, use correct node version

* Don't test Shadowbox on Windows or Mac

* Don't cancel other jobs in the matrix when the build on one platform fails

* Use bash on all platforms.  This uses Git for Windows bash on Windows

* Remove Windows tests for now.  This is not a downgrade as we were only testing on linux before anyways

* Reduce code duplication

* Remove test config from Travis

* Respond to review comments:
 * Remove redundant build step in the shadowbox unit testing workflow
 * Add a testing step to the shadowbox release Travis workflow

* Pin to Ubuntu 16.04 to match our release infrastructure on Travis

* Run daily releases of the manager on all platforms

* Verbose mode on docker-compose

* try turning off Docker Content Trust

* Pin to a version of distroless Python and stop removing temp files at the end

* Remove verbose from compose

* Use Ubuntu 16.04

* Comment the pinned python image

* Add temp state cleanup back
2021-02-09 13:34:32 -05:00

66 lines
1.6 KiB
YAML

name: Build and Test
on: push
jobs:
manager:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# This matches the Ubuntu version used in our Travis releases
os: [ubuntu-16.04]
# Don't cancel jobs on other platforms if one fails
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 12
- name: Show Environment Info
run: yarn -v
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Check yarn cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --prefer-offline
- name: Lint
run: yarn lint
- name: Manager
run: |
yarn do server_manager/electron_app/build
yarn do server_manager/test
- name: Shadowbox
if: runner.os == 'Linux'
run: |
yarn do shadowbox/server/build
yarn do shadowbox/test
yarn do shadowbox/integration_test/run
- name: Metrics Server
if: runner.os == 'Linux'
run: |
yarn do metrics_server/build
yarn do metrics_server/test
- name: Sentry Webhook
if: runner.os == 'Linux'
run: yarn do sentry_webhook/build