-
Notifications
You must be signed in to change notification settings - Fork 3
170 lines (131 loc) · 4.61 KB
/
Copy pathtest.yml
File metadata and controls
170 lines (131 loc) · 4.61 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: CI
on:
push:
branches:
- main
- dev-refactor
pull_request:
branches:
- main
- dev-refactor
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CLICOLOR: 1
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: ⎔ Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24
cache: pnpm
- name: 📥 Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: 🧹 Lint
run: pnpm exec oxlint
- name: 🧪 Test Integrity
run: pnpm run test:integrity
- name: 🔍 Type Check
run: pnpm run typecheck
- name: 🧪 Unit Tests and Coverage
run: pnpm run test:coverage
- name: 📈 Changed-Code Coverage
if: github.event_name == 'pull_request' || github.event_name == 'push'
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: >-
pnpm run test:coverage:changed
"${{ github.event.pull_request.base.sha || github.event.before }}"
- name: 📊 Report Coverage
if: >-
always() &&
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
uses: davelosert/vitest-coverage-report-action@3c50566c523e04813df28de8f7c48dd97d663f1c # v2
with:
pr-number: auto
browser:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: ⎔ Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24
cache: pnpm
- name: 📥 Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: 🎭 Install Chromium
run: pnpm exec playwright install --with-deps chromium
- name: 🧪 Browser Tests
run: pnpm run test:browser
- name: 🧵 Worker Placement Evidence
run: pnpm run test:worker-placement
package:
env:
EXPECTED_PNPM_VERSION: ${{ matrix.pnpm-version }}
npm_config_manage_package_manager_versions: "false"
npm_config_package_manager_strict_version: "false"
strategy:
fail-fast: false
matrix:
include:
- node-version: "20.19.0"
pnpm-manifest: "test/package-smoke/package.json"
pnpm-version: "10.28.2"
- node-version: "24"
pnpm-manifest: "package.json"
pnpm-version: "11.4.0"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
with:
package_json_file: ${{ matrix.pnpm-manifest }}
version: ${{ matrix.pnpm-version }}
- name: ⎔ Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: 🔒 Verify pnpm version
shell: bash
run: test "$(pnpm --version)" = "${{ matrix.pnpm-version }}"
- name: 📥 Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: 📦 Packed Package Smoke Test
run: pnpm run test:package
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: 🔍 Run CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4
with:
languages: javascript
- name: 🔍 Perform Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4
spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: 🔍 Spell Check Repo
uses: crate-ci/typos@f8a58b6b53f2279f71eb605f03a4ae4d10608f45 # v1.47.0