Skip to content

Commit

Permalink
chore: update GA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvdvleuten committed Jan 7, 2021
1 parent f6c3439 commit b44c124
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
name: test

on:
push: {branches: master}
pull_request: {branches: master}
push:
branches:
- "+([0-9])?(.{+([0-9]),x}).x"
- "master"
- "next"
- "next-major"
- "beta"
- "alpha"
- "!all-contributors/**"
pull_request: {}

jobs:
test:
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}

name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: Setup Node
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 10.13.0
node-version: 14

- name: Cache NPM dependencies
uses: actions/cache@v2
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install NPM dependencies
run: npm ci

- name: Run tests
run: |
npm run build
npm run test
useLockFile: false

- name: 🏗 Run build script
run: npm run build

- name: ▶️ Run test script
run: npm run test

0 comments on commit b44c124

Please sign in to comment.