Files
services/.github/workflows/test.yml
T

44 lines
1.0 KiB
YAML

name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: '.nvmrc'
- name: Run pnpm install
run: pnpm install --frozen-lockfile
- name: Run linter
run: pnpm run lint
if: ${{ !cancelled() }}
- name: Run formatter
run: pnpm run format
if: ${{ !cancelled() }}
- name: Run tsc
run: pnpm run check
if: ${{ !cancelled() }}
- name: Run unit tests
run: pnpm run test
if: ${{ !cancelled() }}