Skip to content

Commit

Permalink
chore: linter updates for renamed module
Browse files Browse the repository at this point in the history
- Block `ethereum/go-ethereum` upstream module usage
- Disable `goimports` checks on upstream code
- Update flaky-test regex
- Run flaky and non-flaky tests in different steps as this makes it easier to spot incorrect regex
  • Loading branch information
ARR4N committed Oct 13, 2024
1 parent d6d53f9 commit a01599a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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}");
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 a01599a

Please sign in to comment.