Add GHA workflow to run test_crosscompile and go test (#141)

* Add GHA workflow to run test_crosscompile and go test
* crosscompile job doesn't need setup-go
* Test more go versions
* Test 1.6
* Remove 1.13 and add comment of testing strategy
This commit is contained in:
Fraser Waters
2022-03-27 13:14:20 +01:00
committed by GitHub
parent edfd13da2a
commit 7de28cee0d
37 changed files with 95 additions and 39 deletions

17
.github/workflows/crosscompile.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Crosscompile
on:
push:
branches:
- master
jobs:
test:
name: Run ./test_crosscompile.sh
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run ./test_crosscompile.sh
run: ./test_crosscompile.sh

39
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Test go ${{ matrix.go_version }} on ${{ matrix.platform }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
go_version:
# Test the oldest release we targeted and the two currently supported releases (https://go.dev/doc/devel/release#policy)
- 1.6.x
- 1.17.x
- 1.18.x
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Checkout repo
uses: actions/checkout@v2
- name: Build
run: go build -v
- name: Test
run: go test -v