aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/run-unit-tests.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/run-unit-tests.yml')
-rw-r--r--.github/workflows/run-unit-tests.yml24
1 files changed, 18 insertions, 6 deletions
diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml
index 87ab4e8..9ea14ed 100644
--- a/.github/workflows/run-unit-tests.yml
+++ b/.github/workflows/run-unit-tests.yml
@@ -1,16 +1,28 @@
-name: run-unit-tests
-on: [pull_request]
+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: |
- TAG=$(docker build --target testing -q ./server)
- echo "image_tag=${TAG}" >> $GITHUB_ENV
+ run: >
+ docker buildx build --load
+ --platform linux/amd64 --target testing
+ -t test_container
+ ./server
- name: Run unit tests
- run: docker run --rm -t ${{ env.image_tag }} --color=no szurubooru/
+ run: >
+ docker run --rm -t test_container
+ --color=no
+ --cov-report=term-missing:skip-covered
+ --cov=szurubooru
+ szurubooru/

© 2015 - 2026 Jakob L. Kreuze