Update README.md #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- '.golangci.yml' | |
- '.github/workflows/main.yml' | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
jobs: | |
test: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: 1.19 | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# with: | |
# fetch-depth: 1 | |
- name: go test | |
# issue: pattern ./...: directory prefix . does not contain main module or its selected dependencies | |
# see https://github.com/golangci/golangci-lint/issues/2654 | |
# or, maybe, just maybe, I simply forgot to add actions/checkout like a dummy | |
run: go test -v ./... # -coverprofile=coverage.txt -covermode=atomic | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | |
with: | |
args: --timeout 1m |