-
Notifications
You must be signed in to change notification settings - Fork 15
102 lines (80 loc) · 3.04 KB
/
Copy pathpr-checks.yml
File metadata and controls
102 lines (80 loc) · 3.04 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
name: PR Checks
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-build:
name: Lint & Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build CLI
run: pnpm --filter @profullstack/threatcrush build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
- name: Build landing page
run: pnpm --filter threatcrush build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
- name: Type check CLI
run: pnpm --filter @profullstack/threatcrush exec tsc --noEmit
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
- name: Test web app
run: pnpm --filter @profullstack/threatcrush-web test
- name: Test CLI
run: pnpm --filter @profullstack/threatcrush test
- name: Test scan package
run: pnpm --filter @threatcrush/scan test
- name: Test modules
run: pnpm --filter './modules/*' test
- name: Test desktop app
run: pnpm --filter @profullstack/threatcrush-desktop test
- name: Test browser extension
run: pnpm --filter @profullstack/threatcrush-extension test
- name: Build browser extension
run: pnpm --filter @profullstack/threatcrush-extension build
- name: Type check mobile app
run: pnpm --filter @profullstack/threatcrush-mobile typecheck
- name: Test mobile app
run: pnpm --filter @profullstack/threatcrush-mobile test
libinjection-wasm:
# The checked-in libinjection.wasm must be exactly what the vendored C
# sources build (apps/cli/scripts/build-libinjection-wasm.mjs), so the
# binary shipped to npm is reviewable through its sources.
name: libinjection.wasm is reproducible
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
use-cache: false
- name: Rebuild and compare
run: node apps/cli/scripts/build-libinjection-wasm.mjs --check