Skip to content

Commit

Permalink
ci: test against Go 1.17 and current and old stable
Browse files Browse the repository at this point in the history
For ensuring breakages like #129 to never happen again.

And tell bors to wait for the right status after enabling the test
matrix.
  • Loading branch information
xen0n committed Dec 23, 2022
1 parent da32b1f commit a8be3f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/go.yml
Expand Up @@ -16,16 +16,36 @@ jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.17', 'oldstable', 'stable' ]
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: ${{ matrix.go }}

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

# Added to summarize the matrix (otherwise we would need to list every single
# job in bors.toml)
# thanks https://forum.bors.tech/t/bors-with-github-workflows/426/4
tests-result:
name: Tests result
if: always()
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
if: needs.build.result == 'success'
run: exit 0
- name: Mark the job as a failure
if: needs.build.result == 'failure'
run: exit 1
2 changes: 1 addition & 1 deletion bors.toml
@@ -1,3 +1,3 @@
status = [
"build",
"Tests result",
]

0 comments on commit a8be3f3

Please sign in to comment.