Repository navigation
ci: add Rust quality checks #3
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: Run CI - Tests | |
| on: | |
| push: | |
| branches: [master, dev] | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install 1.96.1 --profile minimal | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: magicblock-engine-ci-test-v001 | |
| cache-on-failure: true | |
| - name: Cache Solana CLI | |
| id: cache-solana | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local/share/solana | |
| key: solana-cli-v1-${{ runner.os }}-${{ runner.arch }}-v4.0.3 | |
| - name: Cache Solana platform tools | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/solana | |
| key: solana-platform-tools-v1-${{ runner.os }}-${{ runner.arch }}-v4.0.3 | |
| - name: Install Solana CLI | |
| if: steps.cache-solana.outputs.cache-hit != 'true' | |
| run: sh -c "$(curl -sSfL https://release.anza.xyz/v4.0.3/install)" | |
| - name: Add Solana CLI to PATH | |
| run: echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH" | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Run tests | |
| run: cargo nextest run --nff |