Update .github/workflows/tests.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- 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 | |
- name: Install Anchor | |
run: | | |
cargo install --git https://github.com/coral-xyz/anchor anchor-cli --tag v0.30.1 | |
anchor --version | |
- name: Build Anchor Program | |
run: | | |
anchor build | |
continue-on-error: true | |
- name: Run Anchor Tests | |
run: | | |
anchor test | |
continue-on-error: true | |
- name: Debug Information | |
if: failure() | |
run: | | |
echo "Current directory: $(pwd)" | |
ls -la | |
echo "Rust version: $(rustc --version)" | |
echo "Cargo version: $(cargo --version)" | |
echo "Solana version: $(solana --version)" | |
echo "Anchor version: $(anchor --version)" |