CI: update per kernel tests #471
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
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '**' ] | |
# Set default permissions as read only. | |
permissions: read-all | |
name: Go | |
jobs: | |
go-test: | |
strategy: | |
matrix: | |
go-version: [1.13.x, 1.19.x, 1.20.x, 1.21.x] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Download Go dependencies | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go mod download | |
- name: Simple Tests | |
if: matrix.platform != 'ubuntu-latest' | |
run: go test -count=1 ./... | |
- name: Test with -race | |
if: matrix.platform == 'ubuntu-latest' | |
run: go test -race -count=3 ./... | |
- name: Test with -shuffle=on | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.21') | |
run: go test -shuffle=on -count=3 ./... | |
- name: Integrationtest for linux | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
go test -race -v -exec=sudo -tags integration -covermode=atomic -coverprofile=profile.cov ./... | |
- name: coveralls.io | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.21') | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
go install github.com/mattn/[email protected] | |
goveralls -v -tags integration -coverprofile=profile.cov -service=github | |
code-check: | |
strategy: | |
matrix: | |
go-version: [1.20.x, 1.21.x] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Download Go dependencies | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go mod download | |
- name: golint | |
run: | | |
go install golang.org/x/lint/golint@latest | |
$(go env GOPATH)/bin/golint $(go list ./... | grep -v internal/unix) | |
- name: staticcheck.io | |
if: startsWith(matrix.go-version, '1.21') | |
uses: dominikh/[email protected] | |
with: | |
version: "2023.1.6" | |
install-go: false | |
cache-key: ${{ matrix.go }} |