Skip to content

Commit

Permalink
Merge pull request #32 from ovechkin-dm/27-support-github-actions-tes…
Browse files Browse the repository at this point in the history
…ts-on-arm64

add qemu
  • Loading branch information
ovechkin-dm authored Dec 27, 2023
2 parents 85d5355 + 795280f commit 2380f83
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,34 @@ jobs:
go-version: ${{ matrix.go }}

- name: 'Test on darwin'
if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) }}
if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...

- name: 'Test on linux'
- name: 'Test on linux [amd64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...

- name: 'Setup qemu-user-static on [linux] arch [arm64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}
run: |
sudo apt-get update
sudo apt-get -y install qemu-user-static
- name: 'Test on [linux] arch [arm64] TODO'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -coverpkg=./mock/... ./...

- name: 'Test on windows'
if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) }}
if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
Expand Down

0 comments on commit 2380f83

Please sign in to comment.