Merge pull request #24 from guardian/snyk-fix-b41eeef51dae9f053825c1e… #46
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
name: Run tests on PR and main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
runtests: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
checks: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com/ | |
- run: yarn install --frozen-lockfile | |
- run: yarn test | |
- run: yarn build | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() #runs even if there is a test failure | |
with: | |
files: junit.xml |