Skip to content

Commit

Permalink
Add Dockerized Test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaMuravjov committed May 25, 2024
1 parent 36f2dfc commit 1d2cbdd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dockerized-test.yml
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'"

0 comments on commit 1d2cbdd

Please sign in to comment.