Skip to content

chore: bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 (#35) #92

chore: bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 (#35)

chore: bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 (#35) #92

Workflow file for this run

# this workflow will run on all pushes.
on:
push:
name: "push"
jobs:
# run golangci-lint to lint the golang source code.
# the configuration is at /.golangci.yml.
linter:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: lint
uses: golangci/[email protected]
with:
version: v1.42.1
# optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# use nancy to scan for vulnerabilities.
vulnerability_scanner:
name: Vulnerability scanner
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
uses: actions/setup-go@v5
# we cannot use nancy-github-action because it is outdated, so it's better to use the latest
# docker image for the validation
-
name: nancy
run: go list -json -m all | docker run -i sonatypecommunity/nancy:latest
# run golang test suite and collect their coverage.
test:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get go.mod details
uses: Eun/[email protected]
id: go-mod-details
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ steps.go-mod-details.outputs.go_version }}
- name: Test
env:
COVERAGE_PREFIX: coverage-${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-
run: go test -v -count=1
- name: Send coverage (Bucket 1)
uses: shogo82148/[email protected]
with:
path-to-profile: coverage-${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-bucket0.cov
flag-name: ${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-bucket1
parallel: true
- name: Send coverage (Bucket 2)
uses: shogo82148/[email protected]
with:
path-to-profile: coverage-${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-bucket1.cov
flag-name: ${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-bucket2
parallel: true
- name: Send coverage (Exclude Package)
uses: shogo82148/[email protected]
with:
path-to-profile: coverage-${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-exclude-package.cov
flag-name: ${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-exclude-package
parallel: true
- name: Send coverage (Exclude Directory)
uses: shogo82148/[email protected]
with:
path-to-profile: coverage-${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-exclude-directory.cov
flag-name: ${{ matrix.platform }}-${{ steps.go-mod-details.outputs.go_version }}-exclude-directory
parallel: true
# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/[email protected]
with:
parallel-finished: true
# draft your next release notes as pull requests are merged into "master"
# the configuration is at /.github/release-drafter.yml.
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
if: github.ref_name == github.event.repository.default_branch
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}