Repository navigation
82 lines (77 loc) · 1.99 KB
/
Copy pathci.yml
File metadata and controls
82 lines (77 loc) · 1.99 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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 20
cache: "npm"
- name: Install Dependencies
run: npm ci --legacy-peer-deps
- name: Lint
run: npm run lint
- name: Format Check
run: npm run format:check
- name: Security Audit
run: npm audit --audit-level=high || true
- name: Docs Sync Check
run: npm run check:docs
- name: Generate Documentation
run: npm run build:docs
- name: Link Checker
uses: lycheeverse/lychee-action@v2
with:
args: --offline --root-dir . --exclude-path node_modules '**/*.md'
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 20
cache: "npm"
- name: Install Dependencies
run: npm ci --legacy-peer-deps
- name: Unit Tests
run: npm run test:coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 20
cache: "npm"
- name: Install Dependencies
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
lighthouse:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 20
cache: "npm"
- name: Install Dependencies
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
- name: Lighthouse CI
run: npm run lighthouse