Skip to content

Commit 1a9f1ab

Browse files
committed
feat: add github workflow
1 parent 31b041b commit 1a9f1ab

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-solana:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Install Rust
11+
uses: actions-rs/toolchain@v1
12+
- name: Install Solana
13+
run: sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
14+
- name: Install Anchor
15+
run: cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked
16+
- name: Build
17+
run: cd solana && anchor build
18+
- name: Test
19+
run: cd solana && anchor test
20+
21+
test-evm:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Install Foundry
26+
uses: foundry-rs/foundry-toolchain@v1
27+
- name: Build
28+
run: cd evm && forge build
29+
- name: Test
30+
run: cd evm && forge test -vvv
31+
```
32+
33+
---
34+
35+
### **10. Add Example Code**
36+
37+
Create `/examples` folder:
38+
```
39+
examples/
40+
├── solana/
41+
│ ├── play-crash.ts
42+
│ ├── play-coinflip.ts
43+
│ └── check-results.ts
44+
├── evm/
45+
│ ├── play-crash.js
46+
│ └── interact.js
47+
└── README.md

0 commit comments

Comments
 (0)