Skip to content

Bump libs, fix linter config and go.mod version, add RISC-V test #251

Bump libs, fix linter config and go.mod version, add RISC-V test

Bump libs, fix linter config and go.mod version, add RISC-V test #251

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- '*'
- '*/*'
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
go: ['~1.18.0', '^1.23']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.os }}
check-latest: true
- name: Run tests
run: make test
test-arm:
name: Test ARM
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ armv6, armv7, aarch64 ]
go: ['1.18.10', 'latest']
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: ${{ matrix.arch }}
distro: alpine_latest
install: apk add --no-cache make
run: |
if [ ${{ matrix.go }} = latest ]; then
go=$(wget -O- 'https://go.dev/dl/?mode=json' | grep -m1 version | awk -F'"' '{ print $4 }')
else
go=go${{ matrix.go }}
fi
case ${{ matrix.arch }} in
arm*) filename=${go}.linux-armv6l.tar.gz ;;
*) filename=${go}.linux-arm64.tar.gz ;;
esac
wget https://golang.org/dl/$filename
tar -C /usr/local -xzf $filename
export PATH=$PATH:/usr/local/go/bin
make test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.23'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6