mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
chore: fix linting ci step
This commit is contained in:
parent
d5608faa7b
commit
813ae1c584
2 changed files with 24 additions and 26 deletions
21
.github/workflows/pull-request.yaml
vendored
21
.github/workflows/pull-request.yaml
vendored
|
|
@ -6,23 +6,22 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
go-version: stable
|
||||||
- name: Set up Go
|
- name: golangci-lint
|
||||||
uses: actions/setup-go@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
version: v1.60
|
||||||
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
|
|
||||||
with:
|
|
||||||
version: "2023.1.6"
|
|
||||||
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -46,7 +45,7 @@ jobs:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
go test -v -coverprofile coverage.out -covermode atomic ./...
|
go test -v -coverprofile coverage.out -covermode atomic ./...
|
||||||
- name: Publish coverage
|
- name: Publish coverage
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
29
.github/workflows/release.yaml
vendored
29
.github/workflows/release.yaml
vendored
|
|
@ -4,26 +4,25 @@ on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
push:
|
push:
|
||||||
tags:
|
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:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
go-version: stable
|
||||||
- name: Set up Go
|
- name: golangci-lint
|
||||||
uses: actions/setup-go@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
version: v1.60
|
||||||
- uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
|
|
||||||
with:
|
|
||||||
version: "latest"
|
|
||||||
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
|
|
@ -52,7 +51,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- test
|
- test
|
||||||
- lint
|
- lint
|
||||||
env:
|
env:
|
||||||
|
|
@ -113,5 +112,5 @@ jobs:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Pull new module version
|
- name: Pull new module version
|
||||||
uses: andrewslotin/go-proxy-pull-action@89382de145eeb7a85de72f8a27f686a50727bc7a #master@2022-10-14
|
uses: andrewslotin/go-proxy-pull-action@89382de145eeb7a85de72f8a27f686a50727bc7a #master@2022-10-14
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue