ci: enable push + pull_request triggers (was workflow_dispatch only) #6
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: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| rust-core: | |
| name: Rust Core | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: core | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: core | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Test | |
| run: cargo test --all-targets --all-features | |
| - name: Build release | |
| run: cargo build --release --bins | |
| go-network: | |
| name: Go Network | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: network | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| cache-dependency-path: network/go.sum | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: go test ./... | |
| - name: Build | |
| run: go build ./cmd/mev-node | |
| solidity-contracts: | |
| name: Solidity Contracts | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: contracts | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: nightly | |
| - name: Build | |
| run: forge build | |
| - name: Test | |
| run: forge test -vv |