Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit e146d3d

Browse files
committed
chore: add GitHub Workflow
1 parent 262dfe1 commit e146d3d

File tree

4 files changed

+1161
-12
lines changed

4 files changed

+1161
-12
lines changed

.github/workflows/test-anchor.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test and Build Anchor
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ['main']
7+
8+
jobs:
9+
test-and-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: 'pnpm'
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- uses: metadaoproject/setup-anchor@v2
31+
with:
32+
anchor-version: '0.30.1'
33+
node-version: '20'
34+
solana-cli-version: '1.18.9'
35+
36+
- name: Generate new keypair
37+
run: solana-keygen new --no-bip39-passphrase
38+
39+
- name: Set solana target cluster to local
40+
run: solana config set --url http://localhost:8899
41+
42+
- name: Check solana config
43+
run: solana config get
44+
45+
- run: pnpm run anchor build
46+
shell: bash
47+
48+
- run: pnpm run anchor test
49+
shell: bash

.github/workflows/test-web.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test and Build Web
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ['main']
7+
8+
jobs:
9+
test-and-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: 'pnpm'
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Build project
31+
run: pnpm build

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@
3636
"devDependencies": {
3737
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
3838
"@eslint/js": "^9.9.0",
39+
"@types/jest": "^29.5.13",
3940
"@types/react": "^18.3.3",
4041
"@types/react-dom": "^18.3.0",
4142
"@vitejs/plugin-react": "^4.3.1",
4243
"eslint": "^9.9.0",
4344
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
4445
"eslint-plugin-react-refresh": "^0.4.9",
4546
"globals": "^15.9.0",
47+
"jest": "^29.7.0",
4648
"prettier": "^3.3.3",
49+
"ts-jest": "^29.2.5",
4750
"typescript": "^5.5.3",
4851
"typescript-eslint": "^8.0.1",
4952
"vite": "^5.4.1",
@@ -68,5 +71,6 @@
6871
"anchor": "0.30.1",
6972
"solana": "1.18.0"
7073
}
71-
}
74+
},
75+
"packageManager": "[email protected]+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
7276
}

0 commit comments

Comments
 (0)