-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.42 KB
/
tests.yml
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
name: Anchor Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/v1.18.22/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
solana --version || echo "Solana version not found"
- name: Install Anchor
run: |
cargo install --git https://github.com/coral-xyz/anchor anchor-cli --tag v0.30.1 || echo "Anchor installation failed"
anchor --version || echo "Anchor version not found"
- name: Debug Project Structure
run: |
echo "Current directory: $(pwd)"
echo "Directory structure:"
tree -L 3 || ls -R
echo "Anchor.toml content:"
cat Anchor.toml || echo "Anchor.toml not found"
echo "Cargo.toml content:"
cat Cargo.toml || echo "Cargo.toml not found"
echo "Program Cargo.toml content:"
cat programs/*/Cargo.toml || echo "Program Cargo.toml not found"
- name: Debug Environment
run: |
echo "Current directory: $(pwd)"
ls -la
echo "Anchor.toml content:"
cat Anchor.toml || echo "Anchor.toml not found"
echo "PATH: $PATH"
echo "Rust version: $(rustc --version)"
echo "Cargo version: $(cargo --version)"
echo "Solana version: $(solana --version)"
echo "Anchor version: $(anchor --version)"
- name: Build Anchor Program
run: anchor build
continue-on-error: true
- name: Debug Build Failure
if: failure()
run: |
echo "Build failed. Debugging information:"
echo "Current directory: $(pwd)"
ls -la
echo "target directory content:"
ls -la target || echo "target directory not found"
echo "programs directory content:"
ls -la programs || echo "programs directory not found"
echo "Cargo.toml content:"
cat Cargo.toml || echo "Cargo.toml not found"
- name: Run Anchor Tests
run: anchor test