diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b849b2c..3147ec5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,11 @@ name: Test +# TODO: DO NOT BUILD AND PUSH ON PR's BUT RUN EVERYTHING ELSE on: + pull_request: push: branches: - master - - ci-test env: REQWEST_TEST_BODY_FULL: 1 @@ -36,29 +37,29 @@ jobs: - run: cargo check --all-targets - run: cargo clippy -- --deny warnings - # spec-tests: - # name: Spec tests - # runs-on: 'ubuntu-latest' - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/cache@v2 - # with: - # path: | - # ~/.cargo/registry - # ~/.cargo/git - # target - # key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # - name: Install rust - # uses: dtolnay/rust-toolchain@master - # with: - # toolchain: ${{ matrix.rust || 'stable' }} - # targets: ${{ matrix.target }} - # - name: Downloading ethereum/tests - # run: git clone https://github.com/ethereum/tests ethereum-tests - # - name: Downloading EELS fixtures released at Cancun - # run: curl -LO https://github.com/ethereum/execution-spec-tests/releases/download/v2.1.1/fixtures.tar.gz && tar -xzf fixtures.tar.gz - # - name: Test specs (EELS and ethereum/tests) - # run: cargo test --features testing + spec-tests: + name: Spec tests + runs-on: 'ubuntu-latest' + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Install rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust || 'stable' }} + targets: ${{ matrix.target }} + - name: Downloading ethereum/tests + run: git clone https://github.com/ethereum/tests ethereum-tests + - name: Downloading EELS fixtures released at Cancun + run: curl -LO https://github.com/ethereum/execution-spec-tests/releases/download/v2.1.1/fixtures.tar.gz && tar -xzf fixtures.tar.gz + - name: Test specs (EELS and ethereum/tests) + run: cargo test --features testing tests: name: Tests ${{ matrix.name }} @@ -129,6 +130,7 @@ jobs: RUSTDOCFLAGS: -D warnings build-and-push-image: + if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' runs-on: ubuntu-latest # needs: tests # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.