-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (93 loc) · 2.73 KB
/
Copy pathci.yml
File metadata and controls
105 lines (93 loc) · 2.73 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: read
jobs:
# ── Org-wide reusable workflows ───────────────────────
pr-conventions:
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]'
uses: sensiblebit/.github/.github/workflows/pr-conventions.yml@main
go-ci:
uses: sensiblebit/.github/.github/workflows/go-ci.yml@main
# ── Project-specific ──────────────────────────────────
wasm:
name: WASM Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
check-latest: true
cache: true
- name: Vet + Build (WASM)
run: |
GOOS=js GOARCH=wasm go vet ./cmd/wasm/
GOOS=js GOARCH=wasm go build -o /dev/null ./cmd/wasm/
web:
name: Web
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
cache-dependency-path: web/package-lock.json
- run: npm ci
- name: Run tests
id: test
run: npm test
- name: Build Cloudflare Functions
if: success() || failure()
run: npx wrangler pages functions build --outdir /tmp/certkit-fn-check
lint:
uses: sensiblebit/.github/.github/workflows/lint.yml@main
with:
prettier_paths: "web/**/*.{js,ts,css,html}"
prettier_exclude: "!web/public/wasm_exec.js"
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
check-latest: true
cache: true
- name: Verify flag tables are up to date
run: |
go generate ./...
git diff --exit-code README.md
# ── Gate ──────────────────────────────────────────────
ci-ok:
name: CI
if: always()
needs:
- pr-conventions
- go-ci
- wasm
- web
- lint
- docs
runs-on: ubuntu-latest
steps:
- name: Check results
run: |
results="${{ join(needs.*.result, ' ') }}"
for r in $results; do
if [ "$r" != "success" ] && [ "$r" != "skipped" ]; then
echo "One or more jobs failed: $results"
exit 1
fi
done
echo "All checks passed"