Use specific docker platform if specified #89
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| run-tests: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Pull test images # TODO: pull image in test itself | |
| run: docker pull alpine:latest | |
| - name: Run tests | |
| run: cargo test --lib | |
| test-catalog-examples: | |
| name: Test example inputs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Test Berachain example | |
| run: cargo run --package bbuilder run examples/input_berachain.json --dry-run | |
| - name: Test Polygon example | |
| run: cargo run --package bbuilder run examples/input_polygon.json --dry-run | |
| - name: Test Ethereum example | |
| run: cargo run --package bbuilder run examples/input_ethereum.json --dry-run | |
| - name: Test Tempo example | |
| run: cargo run --package bbuilder run examples/input_tempo.json --dry-run | |
| test-wasm-build: | |
| name: Test WASM build - ${{ matrix.catalog }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| catalog: [catalog-berachain, catalog-ethereum, catalog-polygon, catalog-tempo] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Build ${{ matrix.catalog }} for WASM | |
| run: cargo build --target wasm32-unknown-unknown -p ${{ matrix.catalog }} |