Skip to content

Commit

Permalink
NOTICKET. Add a github workflow for testing PRs.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewru committed Dec 13, 2021
1 parent 1862916 commit dad708f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
setup:
name: Set-up environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: nvm
run: echo ::set-output name=node-version::$(cat .nvmrc)
shell: bash
working-directory: '${{ inputs.working-directory }}'
- uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.node-version }}"
- id: install
run: npm ci | tee ci-output.log
working-directory: ${{ inputs.working-directory }}
shell: bash
test:
name: Unit Tests
runs-on: ubuntu-latest
needs: setup
steps:
- id: run-test
shell: bash
working-directory: '${{ inputs.working-directory }}'
run: npm test

0 comments on commit dad708f

Please sign in to comment.