Skip to content

Commit

Permalink
cicd: add tests for odd architectures
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Dec 8, 2022
1 parent e923360 commit 7de63a9
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
publish: false

tests:
name: Tests
name: Integration Tests
needs: ['config']
runs-on: ubuntu-latest
container: quay.io/projectquay/golang:${{ matrix.go }}
Expand Down Expand Up @@ -118,3 +118,38 @@ jobs:
with:
name: workspace-${{matrix.go}}
path: ${{ github.workspace }}

arch-tests:
name: Architecture Tests
needs: ['config']
runs-on: ubuntu-latest
strategy:
matrix:
go: ${{ fromJSON(needs.config.outputs.go_versions) }}
# Put non-amd64 platforms that should run tests here:
platform: ['linux/arm64', 'linux/ppc64le']
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/go-cache
with:
go: ${{ matrix.go }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.platform }}
- run: >-
docker run
--rm
--platform ${{ matrix.platform }}
--mount "type=bind,src=$(go env GOMODCACHE),dst=/go/pkg/mod"
--mount "type=bind,src=$(pwd),dst=/build"
-w /build
quay.io/projectquay/golang:${{ matrix.go }}
go test
github.com/quay/claircore/...
./...
- uses: actions/upload-artifact@v3
if: failure()
with:
name: workspace-${{matrix.go}}-${{matrix.platform}}
path: ${{ github.workspace }}

0 comments on commit 7de63a9

Please sign in to comment.