-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (51 loc) · 1.64 KB
/
ci.yml
File metadata and controls
54 lines (51 loc) · 1.64 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# Dependency review for supply chain security (PRs only)
dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: read
steps:
# Pin to SHA for supply chain security
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Dependency Review
uses: actions/dependency-review-action@05fe4576374b728f0c523d6a13d64c25081e0803 # v4.8.3
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
node-version: [18, 20, 22, 24]
steps:
# Pin to SHA for supply chain security
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Verify dist is not committed
run: |
if [ -d dist ]; then
echo "Error: dist/ directory should not be committed to git"
exit 1
fi
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Biome CI check
run: npx biome ci .
- run: npm run build
- name: Verify build artifacts
run: |
test -f dist/rouge.js || (echo "Missing dist/rouge.js" && exit 1)
test -f dist/rouge.mjs || (echo "Missing dist/rouge.mjs" && exit 1)
test -f dist/rouge.d.ts || (echo "Missing dist/rouge.d.ts" && exit 1)
- run: npm test