test.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Tests
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. push:
  7. branches:
  8. - main
  9. paths-ignore:
  10. - "LICENSE"
  11. - "**.md"
  12. pull_request:
  13. paths-ignore:
  14. - "LICENSE"
  15. - "**.md"
  16. jobs:
  17. unit:
  18. name: Unit Tests
  19. runs-on: ubuntu-latest
  20. strategy:
  21. matrix:
  22. base: [alpine, debian]
  23. fail-fast: false
  24. steps:
  25. - uses: actions/checkout@v5
  26. - name: Set up Python 3.12
  27. uses: actions/setup-python@v5
  28. with:
  29. python-version: 3.12
  30. - name: Install dependencies
  31. run: |
  32. python -m pip install --upgrade pip
  33. pip install -r python-requirements.txt
  34. working-directory: test/requirements
  35. - name: Pull nginx:alpine image
  36. run: docker pull nginx:alpine
  37. - name: Build Docker web server image
  38. uses: docker/build-push-action@v6
  39. with:
  40. context: test/requirements/web
  41. tags: web
  42. - name: Build Docker nginx proxy test image
  43. uses: docker/build-push-action@v6
  44. with:
  45. context: .
  46. file: Dockerfile.${{ matrix.base }}
  47. build-args: NGINX_PROXY_VERSION=test
  48. tags: nginxproxy/nginx-proxy:test
  49. - name: Run tests
  50. run: pytest --ignore-flaky
  51. working-directory: test