Skip to content

gha: set default permissions, and add golangci-lint #145

gha: set default permissions, and add golangci-lint

gha: set default permissions, and add golangci-lint #145

Workflow file for this run

name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.go-version || 'minimum' }}
strategy:
matrix:
go-version:
- "" # leave empty to use go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646
- oldstable
- stable
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
GOTOOLCHAIN: local
steps:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod # used when go-version is empty.
- name: Checkout code
uses: actions/checkout@v7
- name: Test
run: go test -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
- name: Test Blake3
run: go test -v ./...
working-directory: blake3
- name: Lint Blake3
uses: golangci/golangci-lint-action@v9
with:
version: v2.11