refactor: various resilience and stability improvements #66
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: Unit tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read # for checkout | |
jobs: | |
test: | |
timeout-minutes: 60 | |
name: Test (${{ matrix.os-version }} / node ${{ matrix.node-version }}) | |
runs-on: ${{ matrix.os-version }} | |
strategy: | |
# we want to know if a test fails on a specific node version | |
fail-fast: false | |
matrix: | |
os-version: [ubuntu-latest] | |
node-version: [lts/-1, lts/*] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- name: Authenticate with private NPM for installing @sanity/sanitype | |
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_SANITYPE_TOKEN}} | |
- name: Install dependencies | |
run: pnpm install | |
- name: Test | |
run: | | |
node -v | |
pnpm test |