From 895ab056d8905de4a3bc1c279192ebd9458bb80f Mon Sep 17 00:00:00 2001 From: leruaa Date: Tue, 1 Oct 2024 06:44:23 +0000 Subject: [PATCH] chore: better CI --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59ebe8b..8b38472 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,17 +6,37 @@ on: pull_request: env: - CARGO_TERM_COLOR: + CARGO_TERM_COLOR: always ETH_HTTP_RPC: ${{ secrets.ETH_HTTP_RPC }} jobs: - build: - - runs-on: ubuntu-latest - + test: + name: Test ${{ matrix.rust }} ${{ matrix.flags }} + timeout-minutes: 30 + runs-on: "ubuntu-latest" + strategy: + fail-fast: false + matrix: + rust: + - "stable" + - "nightly" + flags: + # No features + - "--no-default-features" + # Default features + - "" + # All features + - "--all-features" steps: - - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose \ No newline at end of file + - name: Checkout + uses: actions/checkout@v4 + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + - name: Install cargo-nextest + uses: taiki-e/install-action@nextest + - name: Build + run: cargo build --workspace ${{ matrix.flags }} + - name: Test + run: cargo nextest run --workspace ${{ matrix.flags }} \ No newline at end of file