Skip to content

LICENSE: update year #632

LICENSE: update year

LICENSE: update year #632

Workflow file for this run

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.22.x, 1.23.x, 1.24.x]
platform: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
exclude:
# There is no arm64 version of Go for darwin.
# This exclude can be removed if the minimal Go version
# is > Go 1.16.
- go-version: "1.13.x"
platform: "macos-latest"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
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.2')
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.24')
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.24.x]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
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
uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1
with:
version: "2025.1"
install-go: false
cache-key: ${{ matrix.go }}