-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (102 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
124 lines (102 loc) · 2.71 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
name: CI
on:
pull_request:
push:
branches: [master, main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
quality:
name: Quality
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- name: Engines Check
run: node scripts/engines-check.js
- name: Install
run: npm ci
- name: Biome (Lint & Format)
run: npm run ci
- name: Knip (Dead Code Detection)
run: npm run knip
- name: Typecheck
run: npx tsc --noEmit --pretty false
- name: Build
run: npx tsc -p tsconfig.json --incremental
- name: Test Coverage
run: npm run test:coverage
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: true
- name: Production Audit
run: npm run audit:prod
- name: Secret Pattern Scan
run: npm run scan:secrets
smoke:
name: Smoke
runs-on: ubuntu-latest
needs: quality
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci && npm run build
- run: node dist/cli.js inspect examples/basic.md
mutation:
name: Mutation
runs-on: ubuntu-latest
timeout-minutes: 30
needs: quality
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci
- name: Mutation Test
run: npm run test:mutation
- name: Upload Mutation Report
if: always()
uses: actions/upload-artifact@v7
with:
name: mutation-report
path: reports/mutation
archive: true
if-no-files-found: ignore
e2e:
name: E2E
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx playwright install chromium
- name: E2E Tests
env:
SUBSTACK_EMAIL: ${{ secrets.SUBSTACK_EMAIL }}
SUBSTACK_PASSWORD: ${{ secrets.SUBSTACK_PASSWORD }}
SUBSTACK_PUBLICATION_URL: ${{ secrets.SUBSTACK_PUBLICATION_URL }}
run: npm run test:e2e