mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2025-08-22 05:34:30 +02:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
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:
|
|
flavor: [alpine, debian, dockergen]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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
|
|
run: make build-webserver
|
|
|
|
- name: Build Docker nginx proxy test image
|
|
run: make build-nginx-proxy-test-${{ matrix.flavor }}
|
|
|
|
- name: Run tests
|
|
run: pytest
|
|
working-directory: test
|
|
env:
|
|
COMPOSE_PROFILES: ${{ matrix.flavor == 'dockergen' && 'separateContainers' || 'singleContainer' }}
|