-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
66 lines (58 loc) · 2.23 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Supersede in-flight runs for the same ref — codeyam state commits often land
# in quick succession and only the latest one needs a verdict.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Least privilege: nothing here writes to the repo. The repo-wide default is
# `write`, which this overrides. release.yml declares its own contents:write.
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
# Runs take ~1 min; the GitHub default cap is 360, so a hung job would sit
# burning runner minutes for six hours.
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
# Production deps only — those are the ones that end up in the packaged
# extension. The dev toolchain carries known advisories whose fixes are
# major bumps (vite, vitest); Dependabot surfaces those as reviewable PRs
# instead of wedging every unrelated CI run red.
- run: npm audit --omit=dev --audit-level=high
- run: npm run lint
- run: npm test
- run: npm run build
# Guards a real regression: an earlier package shipped internal URLs and
# scenario mock data. See store/UPLOAD-GUIDE.md. Release runs this too,
# but catching it on the PR beats catching it at the tag.
- name: Verify no codeyam artifacts or internal URLs in build
run: |
if grep -rlE "codeyam|s2/favicons|notion\.so|fonts\.googleapis" build; then
echo "::error::build/ contains codeyam artifacts or internal URLs"
exit 1
fi
# Separate job so it runs alongside `build` rather than lengthening it.
# Complements `npm audit`, which only sees production deps at high+: this
# inspects what the diff actually introduces, dev deps included. Free on
# public repos.
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- uses: actions/dependency-review-action@v5
with:
fail-on-severity: high