mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 13:21:00 +00:00
deps: update golangci/golangci-lint-action action to v8 Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
|
|
with:
|
|
version: v2.1.6 # renovate: datasource=github-releases depName=golangci/golangci-lint
|
|
args: --timeout 5m
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run tests
|
|
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
|
|
|
|
- name: Upload results to Codecov
|
|
uses: codecov/codecov-action@288befbd1044bd1756afb0bdae077549e0ddb31f # v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
go-mod-tidy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run go mod tidy
|
|
run: go mod tidy
|
|
|
|
- name: Check uncommitted changes
|
|
run: git diff --exit-code
|
|
|
|
- if: failure()
|
|
run: echo "::error::Check failed, please run 'go mod tidy' and commit the changes."
|