Feat/pick on collect #153
Workflow file for this run
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: Tests | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
tests: | |
name: Run Jest Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: cache yarn | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-dev-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-dev- | |
- name: setup npm | |
run: | | |
echo "registry=https://registry.yarnpkg.com/" >> ~/.npmrc | |
echo "@helsingborg-stad:registry=https://npm.pkg.github.com" >> ~/.npmrc | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
echo "unsafe-perm=true" >> ~/.npmrc | |
echo "always-auth=true" >> ~/.npmrc | |
- name: yarn install | |
run: yarn install | |
- name: run tests | |
run: yarn test-ci | |
- name: Save output | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: | | |
coverage |