1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2025-08-24 14:44:57 +02:00
nginx-proxy/.github/workflows/test.yml
2025-08-20 00:20:53 +02:00

63 lines
1.3 KiB
YAML

name: Tests
permissions:
contents: read
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: [alpine, debian]
fail-fast: false
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r python-requirements.txt
working-directory: test/requirements
- name: Pull nginx:alpine image
run: docker pull nginx:alpine
- name: Build Docker web server image
uses: docker/build-push-action@v6
with:
context: test/requirements/web
tags: web
- name: Build Docker nginx proxy test image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.${{ matrix.base }}
build-args: NGINX_PROXY_VERSION=test
tags: nginxproxy/nginx-proxy:test
- name: Run tests
run: pytest --ignore-flaky
working-directory: test