diff options
Diffstat (limited to '.github/workflows/run-unit-tests.yml')
| -rw-r--r-- | .github/workflows/run-unit-tests.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml new file mode 100644 index 0000000..9ea14ed --- /dev/null +++ b/.github/workflows/run-unit-tests.yml @@ -0,0 +1,28 @@ +name: Run unit tests +on: [push, pull_request] +jobs: + test-server: + name: Run pytest for server/ + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build test container + run: > + docker buildx build --load + --platform linux/amd64 --target testing + -t test_container + ./server + + - name: Run unit tests + run: > + docker run --rm -t test_container + --color=no + --cov-report=term-missing:skip-covered + --cov=szurubooru + szurubooru/ |