-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.09 KB
/
Copy pathunit.yaml
File metadata and controls
36 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Unit Tests
# No `paths:` filter on purpose. This is a required status check, and a
# workflow that is skipped by a path filter never reports a status at all, so
# the check sits on "Expected" and the PR can never merge. Running it on every
# PR costs ~30s and keeps the gate honest.
on:
pull_request:
branches: [main, dev]
types: [opened, reopened, synchronize, ready_for_review]
jobs:
unit:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 10
- name: Setup node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit + component tests (Vitest)
run: pnpm test:unit