Use GH actions to test cross-arch #1
Workflow file for this run
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: [main] | ||
pull_requests: | ||
branches: ['*'] | ||
permissions: read | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-versions: [1.21.x, 1.20.x] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache-dependency-path: '**/go.sum' | ||
cache: true | ||
- name: Test Native | ||
run: make test | ||
- name: Install QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Test arch=386 | ||
run: make test | ||
env: | ||
GOARCH: 386 | ||
- name: Test arch=arm64 | ||
run: make test | ||
env: | ||
GOARCH: arm64 | ||