Feat/new flow fixes #15
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: | |
branches: | |
- develop | |
- main | |
paths: | |
- .github/workflows/test.yaml | |
- src/** | |
- bin/** | |
- yarn.lock | |
jobs: | |
setup-build-publish-deploy: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Yarn | |
run: corepack enable | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn install | |
- name: Typescript check | |
run: yarn tsc | |
- name: Unit tests | |
run: yarn test:unit |