Skip to content

Commit

Permalink
ci: replace golangci-lint, shellcheck and actionlint with nix flake c…
Browse files Browse the repository at this point in the history
…heck

Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Dec 16, 2024
1 parent 7a7769e commit e223f02
Showing 1 changed file with 10 additions and 43 deletions.
53 changes: 10 additions & 43 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ on:
pull_request:

jobs:
golangci-lint:
flake-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go environment
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
go-version: "stable"
- name: Run golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
args: --timeout=30m
name: edgelesssys
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run nix flake check
run: |
nix -L flake check
go-tidy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,40 +49,6 @@ jobs:
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
severity: info

actionlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go environment
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: "stable"
- name: Install ShellCheck
env:
SHELLCHECK_VER: v0.9.0
run: |
baseurl=https://github.com/koalaman/shellcheck/releases/download
curl -fsSLO "${baseurl}/${SHELLCHECK_VER}/shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz"
tar -xf "shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz"
sudo mv "./shellcheck-${SHELLCHECK_VER}/shellcheck" "${{ github.action_path }}/shellcheck"
rm -rf "shellcheck-${SHELLCHECK_VER}" "shellcheck-${SHELLCHECK_VER}.linux.x86_64.tar.xz"
- name: Run Actionlint
shell: bash
run: |
go install github.com/rhysd/actionlint/cmd/actionlint@latest
actionlint
vendorhash:
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit e223f02

Please sign in to comment.