-
Notifications
You must be signed in to change notification settings - Fork 9
62 lines (48 loc) · 1.54 KB
/
Copy pathci.yml
File metadata and controls
62 lines (48 loc) · 1.54 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
HUSKY: '0'
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.node-version'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Run guardrails (sizes, test boundaries, cache, SDK boundary)
run: npm run check:guardrails
- name: Run tests
run: npm test
- name: Build project
run: npm run build
- name: Check web image is Copilot SDK-free
run: npm run check:web-image
lint-gaps:
# Covers what eslint/tsc can't see: workflow YAML correctness
# (with embedded shellcheck for bash `run:` blocks) and markdown.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Lint GitHub Actions workflows
uses: reviewdog/action-actionlint@be0761e4c1bab7cfdfca56cd03d4bb6253e39a4a # v1.72.0
with:
fail_level: error
reporter: github-check
- name: Lint markdown
if: always()
uses: DavidAnson/markdownlint-cli2-action@fa0cd0f1a052f54da593c83860f2292982f5d142 # v23.2.0