Skip to content

feat(tests): Setup vitest and write tests for helpers #1

feat(tests): Setup vitest and write tests for helpers

feat(tests): Setup vitest and write tests for helpers #1

Workflow file for this run

name: API tests
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
runs-on: ubuntu-22.04
permissions:
# Required to checkout the code
contents: read
strategy:
# If set to true, Github will cancel all other jobs if one of the jobs fails
fail-fast: false
matrix:
branch:
- ${{ github.head_ref }}
- "main"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 22.1.0
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
- name: Get an appropriate name for an artifact
run: echo "ARTIFACT_NAME=coverage-${{ matrix.branch }}" | tr -d ':<>|*?\r\n\/\\' >> $GITHUB_ENV