Skip to content

Commit

Permalink
feat(ci): Added initial workflow for tests to run in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfisher committed Oct 5, 2020
1 parent 5847799 commit c4eb89e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Library Tests

on: push

jobs:
test-matrix:
strategy:
matrix:
node: [ '12', '14' ]
name: Test Library Node v ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v1
with:
path: ./node_modules
key: test-${{ matrix.node }}-${{hashFiles('./package-lock.json')}}
restore-keys: test-${{ matrix.node }}-${{hashFiles('./package-lock.json')}}
- name: Install modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: Run tests
run: npm test

test-success:
runs-on: ubuntu-latest
needs: test-matrix
steps:
- name: Tests completed
run: echo Done!





0 comments on commit c4eb89e

Please sign in to comment.