-
Notifications
You must be signed in to change notification settings - Fork 10
81 lines (81 loc) · 2.48 KB
/
pr-workflow.yaml
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
name: CI
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
fmt:
name: Check & Fmt
runs-on: ubuntu-latest
container:
image: ghcr.io/anagrambuild/bonsol-ci-env:latest
volumes:
- ${{ github.workspace }}:/workspaces/bonsol
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check
shell: bash
id: check
run: |
cargo check --quiet
- name: Fmt
shell: bash
id: fmt
run: |
cargo +nightly fmt --all
test:
name: Unit Test
runs-on: ubuntu-latest
container:
image: ghcr.io/anagrambuild/bonsol-ci-env:latest
options: "-it"
volumes:
- ${{ github.workspace }}:/workspaces/bonsol
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: cargo test -- --nocapture
e2e-test:
name: E2E Test
runs-on: ubuntu-latest-m
container:
image: ghcr.io/anagrambuild/bonsol-ci-env:latest
options: "-it"
volumes:
- ${{ github.workspace }}:/workspaces/bonsol
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v4
id: cache
with:
path: stark
key: stark-v2024-05-17.1
- name: Setup Deps
if: steps.cache.outputs.cache-hit != 'true'
run: ./bin/install_prover.sh --prefix .
- name: E2E Test
run: |
cargo build-sbf
cargo build -p bonsol-node
cargo build -p bonsol-cli
cargo test -p bonsol-cli --features integration-tests -- --nocapture
solana-keygen new --no-bip39-passphrase -f
solana-test-validator \
--ledger ./ledger \
--limit-ledger-size 0 \
--bind-address 0.0.0.0 \
--rpc-pubsub-enable-block-subscription \
--bpf-program BoNsHRcyLLNdtnoDf8hiCNZpyehMC4FDMxs6NTxFi3ew target/deploy/bonsol.so \
--bpf-program exay1T7QqsJPNcwzMiWubR6vZnqrgM16jZRraHgqBGG target/deploy/callback_example.so \
-r &
sleep 30
./bin/run-node.sh &
sleep 15
cargo run -p bonsol-cli -- --keypair /github/home/.config/solana/id.json --rpc-url http://127.0.0.1:8899 deploy url -m cli/src/tests/test_data/test_manifest.json --url https://bonsol-public-images.s3.amazonaws.com/simple-68f4b0c5f9ce034aa60ceb264a18d6c410a3af68fafd931bcfd9ebe7c1e42960 -y
cargo run -p bonsol-tester -- 300