2021-05-01 22:37:01 +02:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
2021-06-16 01:39:47 +02:00
|
|
|
workflow_dispatch:
|
2021-05-01 22:37:01 +02:00
|
|
|
push:
|
|
|
|
paths-ignore:
|
2022-12-03 14:30:40 +01:00
|
|
|
- "LICENSE"
|
|
|
|
- "**.md"
|
2021-05-01 22:37:01 +02:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2022-12-03 14:30:40 +01:00
|
|
|
- "LICENSE"
|
|
|
|
- "**.md"
|
2021-03-19 13:46:38 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit:
|
2021-05-01 22:37:01 +02:00
|
|
|
name: Unit Tests
|
2021-03-19 13:46:38 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-03-19 16:44:50 +01:00
|
|
|
base_docker_image: [alpine, debian]
|
2021-03-19 13:46:38 +01:00
|
|
|
|
|
|
|
steps:
|
2022-12-03 19:36:31 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-19 13:46:38 +01:00
|
|
|
|
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
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: Build Docker web server image
|
2021-03-19 16:44:50 +01:00
|
|
|
run: make build-webserver
|
|
|
|
|
|
|
|
- name: Build Docker nginx proxy test image
|
|
|
|
run: make build-nginx-proxy-test-${{ matrix.base_docker_image }}
|
2021-03-19 13:46:38 +01:00
|
|
|
|
|
|
|
- name: Run tests
|
2021-03-19 16:44:50 +01:00
|
|
|
run: pytest
|
2021-05-01 22:37:01 +02:00
|
|
|
working-directory: test
|