summaryrefslogtreecommitdiff
path: root/.github/workflows/run-unit-tests.yml
blob: 9ea14ed545fa8599421ab69f25a6e1ee58945c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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/