ci/test: speed up tests (#6987)

This commit is contained in:
DaniPopes
2024-03-06 14:30:18 +01:00
committed by GitHub
parent d1dc906d96
commit e42fb32c7f
8 changed files with 59 additions and 48 deletions

View File

@ -29,7 +29,7 @@ jobs:
with:
context: .
tags: ghcr.io/paradigmxyz/reth:latest
build-args: BUILD_PROFILE=hivetests
build-args: BUILD_PROFILE=hivetests,FEATURES=asm-keccak
outputs: type=docker,dest=./artifacts/reth_image.tar
cache-from: type=gha
cache-to: type=gha,mode=max
@ -198,7 +198,7 @@ jobs:
echo "Simulator failed, creating issue"
# Check if issue already exists
# get all issues with the label C-hivetest, loop over each page and check if the issue already exists
existing_issues=$(gh api /repos/paradigmxyz/reth/issues -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -F "labels=C-hivetest" --method GET | jq '.[].title')
if [[ $existing_issues == *"Hive Test Failure: ${{ matrix.sim }}"* ]]; then
echo "Issue already exists"
@ -211,7 +211,7 @@ jobs:
/repos/${{ github.repository }}/issues \
-f title='Hive Test Failure: ${{ matrix.sim }}' \
-f body="!!!!!!! This is an automated issue created by the hive test failure !!!!!!!<br /><br />The hive test for ${{ matrix.sim }} failed. Please investigate and fix the issue.<br /><br />[Link to the failed run](https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }})" \
-f "labels[]=C-hivetest"
-f "labels[]=C-hivetest"
- name: Print simulator output
if: ${{ failure() }}
run: |

View File

@ -18,14 +18,13 @@ concurrency:
jobs:
test:
name: test / ${{ matrix.network }} (${{ matrix.partition }}/2)
name: test / ${{ matrix.network }}
runs-on:
group: Reth
env:
RUST_BACKTRACE: 1
strategy:
matrix:
partition: [1, 2]
network: ["ethereum", "optimism"]
timeout-minutes: 60
steps:
@ -40,10 +39,9 @@ jobs:
- name: Run tests
run: |
cargo nextest run \
--locked --features "${{ matrix.network }}" \
--locked --features "asm-keccak ${{ matrix.network }}" \
--workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/2 \
-E 'kind(test)'
-E "kind(test)"
sync:
name: sync / 100k blocks
@ -63,7 +61,7 @@ jobs:
cache-on-failure: true
- name: Run sync
run: |
cargo run --release --features jemalloc,min-error-logs --bin reth \
cargo run --release --features asm-keccak,jemalloc,min-error-logs --bin reth \
-- node \
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
--debug.max-block 100000 \

View File

@ -38,10 +38,10 @@ jobs:
- name: Run tests
run: |
cargo nextest run \
--locked --features "${{ matrix.network }}" \
--locked --features "asm-keccak ${{ matrix.network }}" \
--workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/2 \
-E "kind(lib) | kind(bin) | kind(proc-macro)"
-E "!kind(test)"
state:
name: Ethereum state tests
@ -65,7 +65,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo nextest run --release -p ef-tests --features ef-tests
- run: cargo nextest run --release -p ef-tests --features "asm-keccak ef-tests"
doc:
name: doc tests (${{ matrix.network }})