From 113aff05da959f2be3afc4c3f19118e4c9a9dd9a Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Fri, 14 Feb 2025 16:12:32 +0000 Subject: [PATCH 1/2] chore: rename `golangci-lint.yml` to `lint.yml` --- .github/workflows/{golangci-lint.yml => lint.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{golangci-lint.yml => lint.yml} (100%) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/lint.yml From 6c7352e79ff75aa6747058450241e7f561477181 Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Fri, 14 Feb 2025 16:19:34 +0000 Subject: [PATCH 2/2] chore: consolidate linters --- .github/workflows/go.yml | 2 +- .github/workflows/lint.yml | 29 ++++++++++++++++++++++++++--- .github/workflows/shellcheck.yml | 22 ---------------------- .github/workflows/yml.yml | 22 ---------------------- 4 files changed, 27 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/shellcheck.yml delete mode 100644 .github/workflows/yml.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1a1d51fa28c..ad55ba24698 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -85,4 +85,4 @@ jobs: needs: go_tidy_matrix runs-on: ubuntu-latest steps: - - run: echo "I'm a no-op" + - run: echo "Dependencies successful" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d06bad71d7b..6dbaf7a08e6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,7 @@ -name: golangci-lint +name: lint + +# If adding a new linter: (a) create a new job; and (b) add it to the `needs` +# list of the `lint` job as this is what gates PRs. on: push: @@ -18,8 +21,13 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - golangci: - name: lint + lint: + runs-on: ubuntu-latest + needs: [golangci-lint, yamllint, shellcheck] + steps: + - run: echo "Dependencies successful" + + golangci-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -40,3 +48,18 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: v1.60 + + yamllint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: yamllint -c .yamllint.yml . + + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@2.0.0 + with: + scandir: './libevm' diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml deleted file mode 100644 index 8e91378eb06..00000000000 --- a/.github/workflows/shellcheck.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: shellcheck - -on: - push: - branches: [main, "release/**"] - pull_request: - branches: [main, "release/**"] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -jobs: - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@2.0.0 - with: - scandir: './libevm' diff --git a/.github/workflows/yml.yml b/.github/workflows/yml.yml deleted file mode 100644 index ece1d125734..00000000000 --- a/.github/workflows/yml.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: YAML check - -on: - pull_request: - branches: [main] - paths: - - "**/*.yml" - - "**/*.yaml" - - ".github/workflows/yml.yml" - - ".github/yamllint.yml" - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -jobs: - yaml-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Validate YAML files - run: yamllint -c .yamllint.yml .