test.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. steps:
  22. - uses: actions/checkout@v4
  23. - name: Set up Python 3.12
  24. uses: actions/setup-python@v5
  25. with:
  26. python-version: 3.12
  27. - name: Install dependencies
  28. run: |
  29. python -m pip install --upgrade pip
  30. pip install -r python-requirements.txt
  31. working-directory: test/requirements
  32. - name: Pull nginx:alpine image
  33. run: docker pull nginx:alpine
  34. - name: Build Docker web server image
  35. run: make build-webserver
  36. - name: Build Docker nginx proxy test image
  37. run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}
  38. - name: Run tests
  39. run: pytest
  40. working-directory: test