Skip to content

update readme

update readme #1129

Workflow file for this run

name: build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['tip', '1.22', '1.21', '1.20', '1.19', '1.18']
steps:
- name: Setup Go
if: matrix.go-version != 'tip'
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go-version }}
- name: Setup Go tip if needed
if: matrix.go-version == 'tip'
run: |
set -ex
commit=$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1}')
curl -LOJ https://storage.googleapis.com/go-build-snap/go/linux-amd64/${commit}.tar.gz
rm -rf /usr/local/go
sudo tar xzf ${commit}.tar.gz -C /usr/local
sudo ln -sf /usr/local/go/bin/go /usr/bin/go
go version
- uses: actions/checkout@v4
- name: Build
run: go build -v -race
- name: Test
run: go test -v
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.22'
check-latest: true
- uses: actions/checkout@v4
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.2
./bin/golangci-lint run