test.yml 948 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Tests
  2. on:
  3. workflow_dispatch:
  4. push:
  5. paths-ignore:
  6. - 'LICENSE'
  7. - '**.md'
  8. pull_request:
  9. paths-ignore:
  10. - 'LICENSE'
  11. - '**.md'
  12. jobs:
  13. unit:
  14. name: Unit Tests
  15. runs-on: ubuntu-latest
  16. strategy:
  17. fail-fast: true
  18. matrix:
  19. base_docker_image: [alpine, debian]
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Set up Python 3.9
  23. uses: actions/setup-python@v2
  24. with:
  25. python-version: 3.9
  26. - name: Install dependencies
  27. run: |
  28. python -m pip install --upgrade pip
  29. pip install -r python-requirements.txt
  30. working-directory: test/requirements
  31. - name: Build Docker web server image
  32. run: make build-webserver
  33. - name: Build Docker nginx proxy test image
  34. run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}
  35. - name: Run tests
  36. run: pytest
  37. working-directory: test