-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (78 loc) · 2.17 KB
/
Copy pathcode-quality.yaml
File metadata and controls
103 lines (78 loc) · 2.17 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
name: Code Quality Checks
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
run-build:
runs-on: ubuntu-latest
container:
# https://playwright.dev/docs/docker#pull-the-image
image: mcr.microsoft.com/playwright:v1.52.0-noble
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 22.22.x
- name: Install dependencies
run: npm ci
- name: Build each package
run: |
npm run build:comet-uswds
npm run build:comet-extras
npm run build:comet-data-viz
npm run build:comet-mcp
run-test-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 22.22.x
- name: Install dependencies
run: npm ci
- name: Run Vitest tests with coverage
run: npm run test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/coverage-final.json
- name: Install Playwright browsers
run: npx playwright install
- name: Run Storybook tests with accessibility checks
run: npm run test:storybook
run-lint-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 22.22.x
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint:ci
run-formatting-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 22.22.x
- name: Install dependencies
run: npm ci
- name: Format code
run: npm run format:ci