Skip to content

Commit

Permalink
Merge lint job into Go workflow jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Feb 17, 2025
1 parent 1007f65 commit 9d3b8c5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 49 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` linter option.
pull-requests: read

jobs:
go:
runs-on: ubuntu-latest
Expand All @@ -24,6 +30,9 @@ jobs:
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)$"
steps:
- uses: actions/checkout@v4

- run: yamllint -c .yamllint.yml .

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
Expand All @@ -33,6 +42,21 @@ jobs:
run: go list ./... | grep -Pv "${EXCLUDE_REGEX}" | xargs go generate;
- run: git diff --exit-code

- name: goheader
# The goheader linter is only enabled in the CI so that it runs only on modified or new files
# (see only-new-issues: true). It is disabled in .golangci.yml because
# golangci-lint running locally is not aware of new/modified files compared to the base
# commit of a pull request, and we want to avoid reporting invalid goheader errors.
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 since v6.3.1 does not handle `only-new-issues` correctly
with:
version: v1.60
only-new-issues: true
args: --enable-only goheader

- uses: golangci/golangci-lint-action@v6
with:
version: v1.60

- name: Run flaky tests sequentially
run:
| # Upstream flakes are race conditions exacerbated by concurrent tests
Expand All @@ -47,6 +71,11 @@ jobs:
working-directory: ./libevm/tooling
steps:
- uses: actions/checkout@v4

- uses: ludeeus/action-shellcheck@2.0.0
with:
scandir: "./libevm"

- uses: actions/setup-go@v5
with:
go-version-file: ./libevm/tooling/go.mod
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/lint.yml

This file was deleted.

0 comments on commit 9d3b8c5

Please # to comment.