diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d9b5e5d..0dda4be 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,11 +23,13 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] + go: ['~1.19.0', '^1.23'] steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '^1.23' + go-version: ${{ matrix.go }} + check-latest: true - name: Run tests run: make test @@ -37,29 +39,32 @@ jobs: strategy: matrix: arch: [ armv6, armv7, aarch64 ] + go: ['1.19.13', 'latest'] steps: - uses: actions/checkout@v4 - uses: uraimo/run-on-arch-action@v2 id: runcmd with: arch: ${{ matrix.arch }} - distro: bullseye - install: | - apt update - apt install -y build-essential wget - - if [[ ${{ matrix.arch }} == arm* ]]; then - pkg=go1.22.0.linux-armv6l.tar.gz + 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 - pkg=go1.22.0.linux-arm64.tar.gz + go=go${{ matrix.go }} fi - wget https://golang.org/dl/$pkg - tar -C /usr/local -xzf $pkg - run: | + 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 - go build cmd/test/test.go - go test --timeout 5m --count 1 ./... + + make test lint: name: Lint diff --git a/cmd/test/test.go b/cmd/test/test.go index 963969c..70dd534 100644 --- a/cmd/test/test.go +++ b/cmd/test/test.go @@ -93,7 +93,7 @@ func executeCommand(cmd string) { //nolint:cyclop // we must keep everything her stderr("panic: this is fake\n") panic("and this is not") - case "fatal-error": // force a concurrent map error + case "fatal-error": // force a concurrent map writes error m := make(map[int]int) go func() {