2
0

test.yml 1.0 KB

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