-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36f2dfc
commit 1d2cbdd
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Dockerized Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
dockerized-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
platform: [linux/amd64, linux/arm64] | ||
env: | ||
DOCKER_IMAGE: cfpq/py_algo:1.0.1 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx and QEMU | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Pull Docker image | ||
run: docker pull --platform ${{ matrix.platform }} ${{ env.DOCKER_IMAGE }} | ||
|
||
- name: Run tests in Docker | ||
run: | | ||
docker run --rm \ | ||
--platform ${{ matrix.platform }} \ | ||
-v "${{ github.workspace }}:/app" \ | ||
${{ env.DOCKER_IMAGE }} -c " | ||
echo 'System Info:'; | ||
uname -a; | ||
pytest test -v -m 'CI'" |