Cspell adding ignore path #24
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: Run tests and upload results | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- cmd/** | |
- internal/** | |
- .dockerignore | |
- .golangci.yml | |
- go.mod | |
- go.sum | |
pull_request: | |
branches: | |
- main | |
paths: | |
- cmd/** | |
- internal/** | |
- .dockerignore | |
- .golangci.yml | |
- go.mod | |
- go.sum | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: ["1.21.x"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# Require: The version of golangci-lint to use. | |
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | |
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | |
version: latest | |
args: --timeout=5m | |
- name: Install dependencies | |
run: go mod download | |
- name: Test with Go | |
run: go test ./... -json > TestResults-${{ matrix.go-version }}.json | |
- name: Upload Go test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Go-results-${{ matrix.go-version }} | |
path: TestResults-${{ matrix.go-version }}.json |