mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
chore: CI updates for renamed module
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
This commit is contained in:
parent
4410f807c2
commit
5c6635282d
3 changed files with 15 additions and 7 deletions
7
.github/workflows/go.yml
vendored
7
.github/workflows/go.yml
vendored
|
|
@ -9,6 +9,8 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go_test_short:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -16,8 +18,9 @@ jobs:
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.4
|
go-version: 1.21.4
|
||||||
- name: Run tests
|
- name: Run flaky tests sequentially
|
||||||
run: | # Upstream flakes are race conditions exacerbated by concurrent tests
|
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;
|
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}");
|
go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}");
|
||||||
|
|
|
||||||
11
.github/workflows/libevm-delta.yml
vendored
11
.github/workflows/libevm-delta.yml
vendored
|
|
@ -9,6 +9,9 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
diffs:
|
diffs:
|
||||||
|
env:
|
||||||
|
# Last commit on `renamed-go-module` branch to be merged into `main`
|
||||||
|
LIBEVM_BASE: a7f08d0e757d5a69d3e269c69dcea7e45bab97e3
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -21,19 +24,19 @@ jobs:
|
||||||
git config color.diff.old "#DC3220";
|
git config color.diff.old "#DC3220";
|
||||||
git config color.diff.new "#005AB5";
|
git config color.diff.new "#005AB5";
|
||||||
|
|
||||||
- name: git diff libevm-base
|
- name: git diff {LIBEVM_BASE}
|
||||||
run: |
|
run: |
|
||||||
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
||||||
libevm-base \
|
"${LIBEVM_BASE}" \
|
||||||
':(exclude).golangci.yml' \
|
':(exclude).golangci.yml' \
|
||||||
':(exclude).github/**' \
|
':(exclude).github/**' \
|
||||||
':(exclude)README.md';
|
':(exclude)README.md';
|
||||||
|
|
||||||
- name: git diff libevm-base..main
|
- name: git diff {LIBEVM_BASE}..main
|
||||||
run: |
|
run: |
|
||||||
git checkout main --;
|
git checkout main --;
|
||||||
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
||||||
libevm-base \
|
"${LIBEVM_BASE}" \
|
||||||
':(exclude).golangci.yml' \
|
':(exclude).golangci.yml' \
|
||||||
':(exclude).github/**' \
|
':(exclude).github/**' \
|
||||||
':(exclude)README.md';
|
':(exclude)README.md';
|
||||||
|
|
|
||||||
|
|
@ -61,13 +61,14 @@ linters-settings:
|
||||||
gomodguard:
|
gomodguard:
|
||||||
blocked:
|
blocked:
|
||||||
modules:
|
modules:
|
||||||
|
- github.com/ethereum/go-ethereum:
|
||||||
- github.com/ava-labs/avalanchego:
|
- github.com/ava-labs/avalanchego:
|
||||||
- github.com/ava-labs/coreth:
|
- github.com/ava-labs/coreth:
|
||||||
- github.com/ava-labs/subnet-evm:
|
- github.com/ava-labs/subnet-evm:
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
- name: unused-parameter
|
- 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.
|
# named _ is of questionable benefit.
|
||||||
disabled: true
|
disabled: true
|
||||||
|
|
||||||
|
|
@ -84,6 +85,7 @@ issues:
|
||||||
- gci
|
- gci
|
||||||
- gofmt
|
- gofmt
|
||||||
- goheader
|
- goheader
|
||||||
|
- goimports
|
||||||
- gosec
|
- gosec
|
||||||
- gosimple
|
- gosimple
|
||||||
- govet
|
- govet
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue