ci: update workflow triggers to run on workflow changes and all merges to main #197
Workflow file for this run
This file contains hidden or 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: "Lazer Rust Test Suite" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- .github/workflows/ci-lazer-rust.yml | |
- lazer/** | |
jobs: | |
lazer-rust-test-suite: | |
name: Lazer Rust Test Suite | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: lazer | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: 1.81.0 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "lazer -> target" | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: install extra tools | |
run: | | |
cargo install --locked [email protected] | |
sudo apt-get install -y protobuf-compiler | |
- name: Install Solana Cli | |
run: | | |
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" | |
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH" | |
- name: check Cargo.toml formatting | |
run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; | |
- name: Build Solana programs | |
run: cargo build-sbf | |
- name: test | |
run: cargo test |