Skip to content

Commit

Permalink
Test oldest + latest go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
grongor committed Sep 12, 2024
1 parent 97a6a84 commit 9a5a9f8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:
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: '^1.23'
go-version: ${{ matrix.go }}
check-latest: true
- name: Run tests
run: make test

Expand All @@ -37,29 +39,32 @@ jobs:
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: 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
Expand Down
2 changes: 1 addition & 1 deletion cmd/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 9a5a9f8

Please sign in to comment.