Merge pull request #159 from AndreRenaud/feature/drain-support #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
native-os-build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: "1.17" | |
- name: Build native | |
run: GOARCH=amd64 go build -v ./... | |
shell: bash | |
- name: Install socat | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install socat | |
shell: bash | |
- name: Run unit tests | |
run: go test -v -race ./... | |
shell: bash | |
- name: Cross-build for 386 | |
if: matrix.os != 'macOS-latest' | |
run: GOARCH=386 go build -v ./... | |
shell: bash | |
- name: Cross-build for arm | |
if: matrix.os != 'macOS-latest' | |
run: GOARCH=arm go build -v ./... | |
shell: bash | |
cross-os-build: | |
strategy: | |
matrix: | |
go-os-pairs: | |
- "freebsd amd64" | |
- "openbsd amd64" | |
- "openbsd 386" | |
- "openbsd arm" | |
- "linux ppc64le" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: "1.17" | |
- name: Cross-build | |
run: | | |
set ${{ matrix.go-os-pairs }} | |
GOOS=$1 GOARCH=$2 go build -v ./... | |
shell: bash |