Skip to content

Commit

Permalink
chore: fix linting ci step
Browse files Browse the repository at this point in the history
  • Loading branch information
beatkind committed Jan 5, 2025
1 parent aff5a3a commit a55655d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ on:
branches:
- main

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: "2023.1.6"
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
version: v1.60
test:
name: Test
strategy:
Expand All @@ -46,7 +45,7 @@ jobs:
go-version: 1.23.x
- name: Run tests
run: |
go test -v -coverprofile coverage.out -covermode atomic ./...
go test -v -coverprofile coverage.out -covermode atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v5
with:
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@ on:
workflow_dispatch: {}
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '**/v[0-9]+.[0-9]+.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "**/v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: "latest"
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
version: v1.60

test:
name: Test
Expand Down Expand Up @@ -52,7 +51,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
needs:
needs:
- test
- lint
env:
Expand Down Expand Up @@ -113,5 +112,5 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@89382de145eeb7a85de72f8a27f686a50727bc7a #master@2022-10-14
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@89382de145eeb7a85de72f8a27f686a50727bc7a #master@2022-10-14

0 comments on commit a55655d

Please sign in to comment.