-
Notifications
You must be signed in to change notification settings - Fork 3
97 lines (91 loc) · 3.06 KB
/
Copy pathci.yml
File metadata and controls
97 lines (91 loc) · 3.06 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
push:
branches: [main, release/**]
# No branch filter: a pull request onto any base, including a stacked PR
# onto another feature branch, must be checked before it is merged.
pull_request:
merge_group:
workflow_dispatch:
# Cancel superseded PR runs; main always finishes (baseline).
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Nothing here writes to the repository. Each job asks for what it reads.
permissions: {}
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# pnpm before setup-node, here and below: the pnpm cache shells out to
# `pnpm store path`.
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install Packages
run: pnpm install --frozen-lockfile
- run: pnpm run lint
build-test:
name: ${{ matrix.task }} (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
strategy:
fail-fast: false
matrix:
node: ['22', '24', '26']
task: [Build, Test]
include:
- task: Build
script: build
- task: Test
script: test
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install Packages
run: pnpm install --frozen-lockfile
# Through the environment, not the shell: an expression expanded into
# `run` is the template-injection shape, whatever the value happens to be.
- run: pnpm run "$TASK_SCRIPT"
env:
TASK_SCRIPT: ${{ matrix.script }}
eval:
name: Eval (tool responses)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install Packages
run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Check tool responses stay answerable and lean
run: pnpm run eval