Tests #1116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "LICENSE" | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "LICENSE" | |
- "**.md" | |
jobs: | |
unit: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
base_docker_image: [alpine, debian] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r python-requirements.txt | |
working-directory: test/requirements | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker web server image | |
uses: docker/build-push-action@v5 | |
with: | |
context: test/requirements/web | |
tags: web | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Build Docker nginx proxy test image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile.${{ matrix.base_docker_image }} | |
build-args: | | |
NGINX_PROXY_VERSION=test | |
tags: nginxproxy/nginx-proxy:test | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Run tests | |
run: pytest | |
working-directory: test |