From 6eb67dd0b2c32cdfc300fead7101510576dbf7c4 Mon Sep 17 00:00:00 2001 From: Benjamin Cable Date: Sun, 29 Sep 2024 17:41:43 +0100 Subject: [PATCH] fix: ci --- .github/workflows/go.yml | 20 ++++++++++---------- .github/workflows/lint.yml | 26 +++++++++++++------------- .golangci.yml | 15 --------------- 3 files changed, 23 insertions(+), 38 deletions(-) delete mode 100644 .golangci.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 77cf57f..6b30846 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,21 +2,21 @@ name: Go on: push: - branches: [ main, develop ] + branches: [main, develop] pull_request: - branches: [ main, develop ] + branches: [main, develop] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: "./go.mod" + cache: false - - name: Test - run: go test -v ./... --cover + - name: Test + run: go test -v ./... --cover diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7b114b2..48967d7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,22 +2,22 @@ name: Lint on: push: - branches: [ main, develop ] + branches: [main, develop] pull_request: - branches: [ main, develop ] + branches: [main, develop] + workflow_dispatch: jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2.5.2 - with: - version: latest - skip-go-installation: true + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: "./go.mod" + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest + args: --timeout=5m --out-format=colored-line-number --issues-exit-code 0 --new-from-rev=main diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 6f17e98..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,15 +0,0 @@ -linters: - enable: - - revive - - ifshort - - gocritic - - dogsled - - gosec - - misspell - - goconst - - goconst - - noctx - - godot - - goimports - - nakedret - - exportloopref