forked from OpenCoworkAI/open-codesign
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 2.02 KB
/
ci.yml
File metadata and controls
68 lines (56 loc) · 2.02 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
# Cross-platform builds happen on tag releases via release.yml.
# PR/main CI runs on ubuntu only to control Actions cost (macOS 10x / Win 2x multiplier).
name: Lint, typecheck, test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck
- name: Test
run: pnpm test
# Build smoke — bundle the Electron main + renderer so broken imports,
# missing assets, or bad vite config fail here instead of only during a
# tag release. Skip electron-builder packaging (that's release.yml's job).
- name: Build smoke (electron-vite bundle)
run: pnpm --filter @open-codesign/desktop exec electron-vite build
# Linux packaging smoke lives in .github/workflows/packaging-smoke.yml —
# it was pulled out of this workflow because workflow-level
# `cancel-in-progress: true` kept killing it whenever another PR merged
# to main during its ~13 min runtime. The smoke workflow has its own
# per-SHA concurrency group so each packaging-touching commit gets an
# independent smoke that always runs to completion.
dco:
name: DCO check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify Signed-off-by lines
run: |
git log --no-merges --format='%B' origin/${{ github.base_ref }}..HEAD \
| grep -q 'Signed-off-by:' \
|| (echo 'Missing Signed-off-by. Run: git commit -s' && exit 1)