diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index db48851ef50c..17f887d20e14 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,15 +2,15 @@ name: Go on: push: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] pull_request: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] workflow_dispatch: jobs: go_test_short: env: - FLAKY_REGEX: 'ava-labs/libevm/(triedb/pathdb|eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$' + FLAKY_REGEX: "ava-labs/libevm/(triedb/pathdb|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 @@ -19,15 +19,16 @@ jobs: with: go-version: 1.21.4 - 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 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_generate: env: - EXCLUDE_REGEX: 'ava-labs/libevm/(accounts/usbwallet/trezor)$' + EXCLUDE_REGEX: "ava-labs/libevm/(accounts/usbwallet/trezor)$" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 9588e65b4df3..e1f4e8b074cd 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -2,9 +2,9 @@ name: golangci-lint on: push: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] pull_request: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] workflow_dispatch: permissions: diff --git a/.github/workflows/libevm-delta.yml b/.github/workflows/libevm-delta.yml index b2d4e1c6689a..791d1ee4a60d 100644 --- a/.github/workflows/libevm-delta.yml +++ b/.github/workflows/libevm-delta.yml @@ -2,9 +2,9 @@ name: libevm delta on: push: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] pull_request: - branches: [ main, 'release/**' ] + branches: [main, "release/**"] workflow_dispatch: jobs: @@ -18,9 +18,10 @@ jobs: with: fetch-depth: 0 # everything fetch-tags: true - + - name: Color-blindness a11y - run: | # https://davidmathlogic.com/colorblind/#%23D81B60-%231E88E5-%23FFC107-%23004D40:~:text=8%20pairs%20of%20contrasting%20colors + run: + | # https://davidmathlogic.com/colorblind/#%23D81B60-%231E88E5-%23FFC107-%23004D40:~:text=8%20pairs%20of%20contrasting%20colors git config color.diff.old "#DC3220"; git config color.diff.new "#005AB5"; @@ -31,7 +32,7 @@ jobs: ':(exclude).golangci.yml' \ ':(exclude).github/**' \ ':(exclude)README.md'; - + - name: git diff {LIBEVM_BASE}..main run: | git checkout main --; diff --git a/.github/workflows/rename-module.yml b/.github/workflows/rename-module.yml index 2f483cc0190f..cb8b9dccbcd2 100644 --- a/.github/workflows/rename-module.yml +++ b/.github/workflows/rename-module.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: inputs: source_commit: - description: 'Upstream commit on which to base module renaming' + description: "Upstream commit on which to base module renaming" required: true type: string - default: '2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1' + default: "2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1" jobs: rename-module: @@ -42,7 +42,7 @@ jobs: find . -type f | \ xargs grep -In github.com/ethereum/go-ethereum | \ grep -v "https://github.com/ethereum/go-ethereum" - + - name: Set up Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/yml.yml b/.github/workflows/yml.yml new file mode 100644 index 000000000000..de3da43dd529 --- /dev/null +++ b/.github/workflows/yml.yml @@ -0,0 +1,18 @@ +name: YAML check + +on: + pull_request: + branches: [main] + paths: + - "**/*.yml" + - "**/*.yaml" + - ".github/workflows/yml.yml" + - ".github/yamllint.yml" + +jobs: + yaml-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Validate YAML files + run: yamllint -c .yamllint.yml . diff --git a/.golangci.yml b/.golangci.yml index e84912ec0d8e..1bd8c0c69024 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,16 +57,19 @@ linters-settings: - dot - blank goheader: - values: template-path: .libevm-header gomodguard: blocked: modules: - github.com/ethereum/go-ethereum: + reason: "Original, forked repo" - github.com/ava-labs/avalanchego: + reason: "Avoid dependency loop" - github.com/ava-labs/coreth: + reason: "Avoid dependency loop" - github.com/ava-labs/subnet-evm: + reason: "Avoid dependency loop" revive: rules: - name: unused-parameter diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 000000000000..a934fc899ac1 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,13 @@ +extends: default + +rules: + document-start: disable + line-length: disable + comments: + min-spaces-from-content: 1 + truthy: + check-keys: false +ignore: + # Upstream geth files that we don't want to modify unnecessarily. + - .travis.yml + - crypto/secp256k1/libsecp256k1/.travis.yml