Update lint-and-build.yaml to include Go files and Go module files in… #6
Workflow file for this run
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: Lint | |
on: | |
push: | |
paths: | |
- '**/*.go' | |
- '**/*.s' | |
- 'go.mod' | |
- 'go.sum' | |
pull_request: | |
paths: | |
- '**/*.go' | |
- '**/*.s' | |
- 'go.mod' | |
- 'go.sum' | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
jobs: | |
golangci-lint: | |
strategy: | |
matrix: | |
go-version: | |
- '1.15' | |
- '1.16' | |
- '1.17' | |
- '1.18' | |
- '1.19' | |
- '1.20' | |
- '1.21' | |
- '1.22' | |
- '1.23' | |
runs-on: | |
- ubuntu-latest | |
- macos-14 | |
#- [ 'macOS', 'self-hosted', 'lint' ] | |
- windows-latest | |
exclude: | |
#- runs-on: [ 'macOS', 'self-hosted', 'lint' ] | |
- runs-on: macos-14 | |
go-version: '1.15' | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set git to use LF | |
run: | | |
git config core.autocrlf false | |
git rm --cached -r . | |
git reset --hard | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: false | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60.1 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60.1 | |
args: --build-tags purego | |
go-test: | |
needs: golangci-lint | |
if: github.ref == 'refs/heads/master' | |
strategy: | |
matrix: | |
go-version: | |
- '1.15' | |
- '1.16' | |
- '1.17' | |
- '1.18' | |
- '1.19' | |
- '1.20' | |
- '1.21' | |
- '1.22' | |
- '1.23' | |
runs-on: | |
- ubuntu-latest | |
- [ 'macOS', 'self-hosted' ] | |
- windows-latest | |
exclude: | |
- runs-on: [ 'macOS', 'self-hosted' ] | |
go-version: '1.15' | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set git to use LF | |
run: | | |
git config core.autocrlf false | |
git rm --cached -r . | |
git reset --hard | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache-dependency-path: go.sum | |
- name: Install dependencies | |
run: | | |
go get . | |
go get github.com/RyuaNerin/elliptic2@v1.0.0 | |
go get github.com/RyuaNerin/testingutil@v0.1.0 | |
- name: Build | |
run: go build -v ./... | |
- name: Test (purego) | |
run: go test --tags=purego ./... | |
# run: go test -test.short --tags=purego ./... | |
- name: Test | |
run: go test ./... | |
# run: go test -test.short ./... |