-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (105 loc) · 3.42 KB
/
Copy pathci.yml
File metadata and controls
130 lines (105 loc) · 3.42 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop, "feature/**", "release/**", "hotfix/**"]
merge_group:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Quality gate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install mise
run: |
curl https://mise.run | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
- name: Install pinned Node via mise
run: mise install
- name: Set up pnpm
run: |
corepack enable
corepack prepare pnpm@11.9.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Validate repository
run: pnpm validate
portability:
name: Portability (${{ matrix.label }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- label: Linux x64, Node 22
os: ubuntu-latest
platform: linux
architecture: x64
- label: macOS ARM64, Node 22
os: macos-14
platform: darwin
architecture: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install mise
run: |
curl https://mise.run | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
- name: Install pinned Node via mise
run: mise install
- name: Set up pnpm
run: |
corepack enable
corepack prepare pnpm@11.9.0 --activate
- name: Verify runtime matrix
env:
EXPECTED_PLATFORM: ${{ matrix.platform }}
EXPECTED_ARCHITECTURE: ${{ matrix.architecture }}
run: >-
node -e 'if (process.versions.node.split(".")[0] !== "22" ||
process.platform !== process.env.EXPECTED_PLATFORM ||
process.arch !== process.env.EXPECTED_ARCHITECTURE) process.exit(1)'
- name: Preload dependency store
run: pnpm fetch --frozen-lockfile
- name: Install dependencies without registry access
run: pnpm install --offline --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Prove packaged local-hash offline runtime
run: pnpm offline:smoke
- name: Prove local-hash avoids semantic native runtimes
run: pnpm bench:local-hash-runtime
commitlint:
name: Commitlint
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install mise
run: |
curl https://mise.run | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
- name: Install pinned Node via mise
run: mise install
- name: Set up pnpm
run: |
corepack enable
corepack prepare pnpm@11.9.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint commit messages
run: pnpm exec commitlint --from "${{ github.event.pull_request.base.sha }}" --to "${{ github.event.pull_request.head.sha }}" --verbose