...
1name: Test
2
3on:
4 push:
5 branches: [main]
6 pull_request:
7
8jobs:
9 test:
10 strategy:
11 matrix:
12 go-version: [1.18.x, 1.19.x]
13 os: [ubuntu-latest, macos-latest, windows-latest]
14 runs-on: ${{ matrix.os }}
15
16 steps:
17 - name: Install go
18 uses: WillAbides/setup-go-faster@v1.5.0
19 with:
20 go-version: ${{ matrix.go-version }}
21
22 - name: Check out code
23 uses: actions/checkout@v2
24
25 - name: Test
26 run: go test -count 1 -bench . -benchtime 1x ./...
27
28 - name: Test with -tags purego
29 run: go test -count 1 -bench . -benchtime 1x -tags purego ./...
30
31 test-qemu:
32 needs: test
33 strategy:
34 matrix:
35 go-version: [1.18.x, 1.19.x]
36 arch: [386, arm, arm64]
37 runs-on: ubuntu-latest
38
39 steps:
40 - name: Install go
41 uses: WillAbides/setup-go-faster@v1.5.0
42 with:
43 go-version: ${{ matrix.go-version }}
44
45 - name: Install QEMU
46 uses: docker/setup-qemu-action@v1
47
48 - name: Check out code
49 uses: actions/checkout@v2
50
51 - name: Run test via qemu/binfmt
52 # TODO: Run the dynamic linking tests as well. That is a little more
53 # involved.
54 run: go test -v -count 1 -bench . -benchtime 1x
55 env:
56 GOARCH: ${{ matrix.arch }}
View as plain text