Repository navigation
63 lines (59 loc) · 2.13 KB
/
Copy pathci.yml
File metadata and controls
63 lines (59 loc) · 2.13 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
name: CI
on:
pull_request:
workflow_dispatch:
inputs:
os:
description: Runner for the compatibility check
type: choice
options: [ubuntu-latest, windows-latest, macos-latest]
default: ubuntu-latest
node:
description: Node major (26 is a compatibility preview)
type: choice
options: ['22', '24', '26']
default: '24'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: PR checks / compatibility
runs-on: ${{ github.event_name == 'workflow_dispatch' && inputs.os || 'ubuntu-latest' }}
env:
DANSEO_NODE: ${{ github.event_name == 'workflow_dispatch' && inputs.node || '24' }}
timeout-minutes: 10
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
# Released security floors; resolve the newest patch within each supported major.
node-version: ${{ env.DANSEO_NODE == '22' && '^22.23.4' || env.DANSEO_NODE == '24' && '^24.22.1' || env.DANSEO_NODE }}
check-latest: true
cache: npm
- name: Report actual runtime
run: node --version
- run: npm ci
- run: npm run check:format
- run: npm run lint
- run: npm run check:docs
- run: npm run check:language
- name: Select check scope
id: scope
run: node build-tools/ci-scope.js
env:
DANSEO_CI_EVENT: ${{ github.event_name }}
DANSEO_CI_BASE: ${{ github.event.pull_request.base.sha }}
DANSEO_CI_HEAD: ${{ github.event.pull_request.head.sha }}
DANSEO_CI_MERGE: ${{ github.sha }}
- run: npm test
if: steps.scope.outputs.scope != 'docs'
- run: node dist/cli.js validate --workspace examples/minimal --json
if: steps.scope.outputs.scope != 'docs'
- run: npm run test:package
if: steps.scope.outputs.scope != 'docs'