Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Action for building and testing PRs (#924)
* Build the client with Github Actions * Syntax fix * Add runs-on to setup step * You can't checkout in one job and then run in another * Install dependencies * Avoid platform specific build-and-test for now * Show yarn version * Cache Yarn dependencies * Use descriptive build step names * Use yarn's built-in cache detection to use cached deps * How did this even get here * Formatting * Remove stray comment * Only run on push Otherwise we will run the tests twice when a PR is opened -- once for the PR and once for the most recent branch. * Remove unit tests from Travis workflow * Run in series * Update name of workflow
- Loading branch information
Jonathan Cohen
committed
Dec 18, 2020
1 parent
da57869
commit e11f106
Showing
2 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build and Test | ||
|
||
on: push | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and Test Web and Electron Apps | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
|
||
- 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: Build web app | ||
run: yarn gulp build --platform=browser | ||
|
||
- name: Test web app | ||
run: yarn do scripts/test | ||
|
||
- name: Build Electron app | ||
run: yarn do src/electron/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters