-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.33 KB
/
Copy pathci.yml
File metadata and controls
48 lines (39 loc) · 1.33 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
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on:
pull_request:
push:
branches: [main]
# This repo is public and publishes `affitor` to npm; a workflow here never needs write access.
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# Actions are pinned to a commit, not a moving tag: a tag can be repointed,
# and this repo publishes to npm. The comment records which tag was pinned.
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
# This job runs code from the pull request. Do not leave the token in
# .git/config where that code can read it.
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
# No `--if-present`: all three workspaces declare build, lint and test today,
# so a missing script means a package quietly stopped being checked. Fail loudly.
- name: Build
run: npm run build --workspaces
- name: Lint
run: npm run lint --workspaces
- name: Unit tests
run: npm run test --workspaces