Skip to content

Commit

Permalink
chore: CI updates for renamed module
Browse files Browse the repository at this point in the history
Linter:
- Block imports of `ethereum/go-ethereum` upstream module
- Disable `goimports` checks on upstream code

Go:
- Update flaky-test regex
- Run flaky and non-flaky tests in different steps as this makes it easier to spot incorrect regex

Upstream delta:
- Use env var in workflow instead of `libevm-base` tag -> base changes atomically with the update commit
  • Loading branch information
ARR4N committed Oct 17, 2024
1 parent 4410f80 commit 5c66352
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ on:

jobs:
go_test_short:
env:
FLAKY_REGEX: 'ava-labs/libevm/(eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.4
- name: Run tests
- name: Run flaky tests sequentially
run: | # Upstream flakes are race conditions exacerbated by concurrent tests
FLAKY_REGEX='go-ethereum/(eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$';
go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short;
- name: Run non-flaky tests concurrently
run: |
go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}");
11 changes: 7 additions & 4 deletions .github/workflows/libevm-delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:

jobs:
diffs:
env:
# Last commit on `renamed-go-module` branch to be merged into `main`
LIBEVM_BASE: a7f08d0e757d5a69d3e269c69dcea7e45bab97e3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,19 +24,19 @@ jobs:
git config color.diff.old "#DC3220";
git config color.diff.new "#005AB5";
- name: git diff libevm-base
- name: git diff {LIBEVM_BASE}
run: |
git diff --diff-filter=a --word-diff --unified=0 --color=always \
libevm-base \
"${LIBEVM_BASE}" \
':(exclude).golangci.yml' \
':(exclude).github/**' \
':(exclude)README.md';
- name: git diff libevm-base..main
- name: git diff {LIBEVM_BASE}..main
run: |
git checkout main --;
git diff --diff-filter=a --word-diff --unified=0 --color=always \
libevm-base \
"${LIBEVM_BASE}" \
':(exclude).golangci.yml' \
':(exclude).github/**' \
':(exclude)README.md';
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ linters-settings:
gomodguard:
blocked:
modules:
- github.com/ethereum/go-ethereum:
- github.com/ava-labs/avalanchego:
- github.com/ava-labs/coreth:
- github.com/ava-labs/subnet-evm:
revive:
rules:
- name: unused-parameter
# Method parameters may be equired by interfaces and forcing them to be
# Method parameters may be required by interfaces and forcing them to be
# named _ is of questionable benefit.
disabled: true

Expand All @@ -84,6 +85,7 @@ issues:
- gci
- gofmt
- goheader
- goimports
- gosec
- gosimple
- govet
Expand Down

0 comments on commit 5c66352

Please sign in to comment.