Skip to content

Commit

Permalink
Update GitHub CI workflow (#19)
Browse files Browse the repository at this point in the history
* Update GitHub CI workflow

This change updates the GitHub Action workflow used for CI, adding
names to the jobs as well as a terminal job that will simplify the
process of adding required status checks to branches.

Having a known terminal job that is consistent across all projects
makes it easy to add a required status check for a branch—one that
will not change as new intermediate jobs are added.

A lint task and the appropriate `yarn` flags have been added as well.

* Run on all pull_request events
  • Loading branch information
whymarrh authored Sep 23, 2020
1 parent f4ad517 commit 6b812d8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 30 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:

jobs:
build:
name: Build & test
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn --frozen-lockfile --ignore-scripts
- run: yarn build
- run: yarn lint
- run: yarn test
all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-20.04
needs:
- build
steps:
- uses: actions/checkout@v2
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test": "jest",
"test:watch": "jest --watch",
"prepublishOnly": "npm run build",
"lint": "eslint --ext .ts,.js .",
"lint": "printf '%s\n' 'No lint command yet'",
"build": "rollup --config"
},
"license": "MIT",
Expand Down

0 comments on commit 6b812d8

Please sign in to comment.