Repository navigation
124 lines (117 loc) · 3.66 KB
/
Copy pathci.yml
File metadata and controls
124 lines (117 loc) · 3.66 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
web-build:
name: web — next buil
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install
run: npm install --no-audit --no-fund
- name: Build web
run: cd apps/web && npm run build
env:
NEXT_PUBLIC_SOLANA_NETWORK: devnet
NEXT_PUBLIC_PROGRAM_ID: GJap9DjUoKZ9dhXMqGCPTeTzY6kPyBJ51SXL1pi8AmiK
NEXT_PUBLIC_SUPABASE_URL: https://placeholder.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY: placeholder-anon-key
NEXT_PUBLIC_API_URL: https://api.potbot.fun
NEXT_PUBLIC_PRIVY_APP_ID: cmo7w4ycz00oi0cjuypf7pjuf
sdk-typecheck:
name: sdk — tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm install --no-audit --no-fund
- name: tsc --noEmit (SDK)
run: |
cd packages/sdk
npx tsc -p tsconfig.json --noEmit
api-typecheck:
name: api — tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm install --no-audit --no-fund
- name: tsc --noEmit (API)
run: |
cd apps/api
npx tsc -p tsconfig.json --noEmit || echo "::warning::API type-check — non-blocking"
anchor-build:
name: anchor — build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
with:
toolchain: "1.86.0"
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
packages/program/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: anchor build
run: cd packages/program && cargo check --locked
- name: Upload IDL artifact
uses: actions/upload-artifact@v4
with:
name: pot_vault-idl
path: packages/program/target/idl/pot_vault.json
pot-index-test:
name: pot_index — build + LiteSVM tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Solana CLI (Agave)
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/v4.3.0/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
packages/pot-index/target
key: ${{ runner.os }}-pot-index-${{ hashFiles('packages/pot-index/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-pot-index-
- name: Build (SBPF v0) + test
run: cd packages/pot-index && ./test.sh
security-audit:
name: npm audit
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm install --no-audit --no-fund
- name: Audit for high/critical vulnerabilities
run: npm audit --audit-level=high || echo "::warning::Audit found issues — review before mainnet"