Update GitHub Actions workflows to use Bun instead of Yarn/Node.js #7
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: build | |
| on: | |
| push: | |
| branches: ['*'] | |
| tags: ['v[0-9]+.[0-9]+.[0-9]+'] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| # Rust setup and build | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install Solana tools | |
| run: | | |
| sh -c "$(curl -sSfL https://release.solana.com/v1.16.0/install)" | |
| echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
| solana --version | |
| - name: Build Solana program | |
| run: cargo build-bpf | |
| - name: Run Solana tests | |
| run: cargo test-bpf | |
| - name: Run Cargo Clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Build client | |
| run: cd client && bun install | |
| - name: Run client tests | |
| run: cd client && bun test |