Skip to content

Refactor code to improve performance and readability #153

Refactor code to improve performance and readability

Refactor code to improve performance and readability #153

Workflow file for this run

name: test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-13
- macos-12
- macos-11
- windows-2022
- windows-2019
go:
- "1.22"
- "1.21"
- "1.20"
- "1.19"
- "1.18"
- "1.17"
exclude:
# TODO: fix: exit status 0xc0000139
- os: windows-2019
go: "1.22"
- os: windows-2019
go: "1.21"
runs-on: ${{ matrix.os }}
steps:
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v4
- name: test
run: |
go test --race ./...
# OpenBSD
openbsd:
runs-on: "ubuntu-22.04"
timeout-minutes: 30
name: "test (openbsd, 1.21)"
steps:
- uses: "actions/checkout@v3"
- name: "test (openbsd, 1.21)"
id: "openbsd"
uses: "vmactions/openbsd-vm@v1"
with:
prepare: pkg_add go
run: |
go version
useradd -mG wheel action
FSNOTIFY_BUFFER=4096 su action -c 'go test -parallel 1 -race ./...'
su action -c 'go test -parallel 1 -race ./...'
# NetBSD
netbsd:
runs-on: "ubuntu-22.04"
timeout-minutes: 30
name: test (netbsd, 1.21)
steps:
- uses: "actions/checkout@v3"
- name: "test (netbsd, 1.21)"
id: "netbsd"
uses: "vmactions/netbsd-vm@v1"
with:
prepare: pkg_add go
run: |
go121 version
useradd -mG wheel action
FSNOTIFY_BUFFER=4096 su action -c 'go121 test -parallel 1 -race ./...'
su action -c 'go121 test -parallel 1 -race ./...'
lint:
runs-on: ubuntu-latest
steps:
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: checkout
uses: actions/checkout@v4
- name: gofmt
run: |
test -z "$(gofmt -s -d . | tee /dev/stderr)"
- name: vet
run: |
go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
continue-on-error: true
with:
version: latest