mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
chore(ci): yaml linter workflow and fix yaml files (#98)
- New workflow triggering only on yaml file changes using the built-in `yamllint` - `.yamllint.yml` configuration added at the root of the project - Fix existing yml files to satisfy ymllint - Ignore go-ethereum original yml files
This commit is contained in:
parent
ce2cde5662
commit
c996175b46
7 changed files with 53 additions and 17 deletions
11
.github/workflows/go.yml
vendored
11
.github/workflows/go.yml
vendored
|
|
@ -2,15 +2,15 @@ name: Go
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go_test_short:
|
go_test_short:
|
||||||
env:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -19,7 +19,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.4
|
go-version: 1.21.4
|
||||||
- name: Run flaky tests sequentially
|
- 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;
|
go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short;
|
||||||
- name: Run non-flaky tests concurrently
|
- name: Run non-flaky tests concurrently
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -27,7 +28,7 @@ jobs:
|
||||||
|
|
||||||
go_generate:
|
go_generate:
|
||||||
env:
|
env:
|
||||||
EXCLUDE_REGEX: 'ava-labs/libevm/(accounts/usbwallet/trezor)$'
|
EXCLUDE_REGEX: "ava-labs/libevm/(accounts/usbwallet/trezor)$"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
|
||||||
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
|
|
@ -2,9 +2,9 @@ name: golangci-lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
||||||
7
.github/workflows/libevm-delta.yml
vendored
7
.github/workflows/libevm-delta.yml
vendored
|
|
@ -2,9 +2,9 @@ name: libevm delta
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, 'release/**' ]
|
branches: [main, "release/**"]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -20,7 +20,8 @@ jobs:
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Color-blindness a11y
|
- 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.old "#DC3220";
|
||||||
git config color.diff.new "#005AB5";
|
git config color.diff.new "#005AB5";
|
||||||
|
|
||||||
|
|
|
||||||
4
.github/workflows/rename-module.yml
vendored
4
.github/workflows/rename-module.yml
vendored
|
|
@ -4,10 +4,10 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
source_commit:
|
source_commit:
|
||||||
description: 'Upstream commit on which to base module renaming'
|
description: "Upstream commit on which to base module renaming"
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
default: '2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1'
|
default: "2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rename-module:
|
rename-module:
|
||||||
|
|
|
||||||
18
.github/workflows/yml.yml
vendored
Normal file
18
.github/workflows/yml.yml
vendored
Normal file
|
|
@ -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 .
|
||||||
|
|
@ -57,16 +57,19 @@ linters-settings:
|
||||||
- dot
|
- dot
|
||||||
- blank
|
- blank
|
||||||
goheader:
|
goheader:
|
||||||
values:
|
|
||||||
template-path: .libevm-header
|
template-path: .libevm-header
|
||||||
|
|
||||||
gomodguard:
|
gomodguard:
|
||||||
blocked:
|
blocked:
|
||||||
modules:
|
modules:
|
||||||
- github.com/ethereum/go-ethereum:
|
- github.com/ethereum/go-ethereum:
|
||||||
|
reason: "Original, forked repo"
|
||||||
- github.com/ava-labs/avalanchego:
|
- github.com/ava-labs/avalanchego:
|
||||||
|
reason: "Avoid dependency loop"
|
||||||
- github.com/ava-labs/coreth:
|
- github.com/ava-labs/coreth:
|
||||||
|
reason: "Avoid dependency loop"
|
||||||
- github.com/ava-labs/subnet-evm:
|
- github.com/ava-labs/subnet-evm:
|
||||||
|
reason: "Avoid dependency loop"
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
- name: unused-parameter
|
- name: unused-parameter
|
||||||
|
|
|
||||||
13
.yamllint.yml
Normal file
13
.yamllint.yml
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue