blob: 43e66cf887d9b146bd379c6b0a541585317b1d59 [file] [log] [blame]
name: Unit Tests
on:
push:
paths-ignore:
- '**/integration-tests.yml'
- 'test/itest*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
# 3.8 EOL 2024-10 approx
python-version: [3.8, "3.10", 3.12]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0 # need all versions to be able to access server tree commit logs
persist-credentials: false
- uses: actions/checkout@master
with:
persist-credentials: false
repository: apache/incubator-ponymail-unit-tests
path: pmtests
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt
pip install -r test/requirements.txt
# Later versions of html2text cause html-based tests to fail, because of a changed conversion
# This only affects the appearance of the message body, so does not matter for compatibility
pip install html2text==2020.1.16 # optional dependency, but needed for tests
pip list
- name: Check versions
run: |
webui/js/source/build.sh
server/update_version.sh
- name: Test with pytest
run: |
cp tools/archiver.yaml.example tools/archiver.yaml
python -m pytest test/test_*.py
- name: Test with Ponymail Unit tests
run: |
sed -e '/incubator/s/# cropout:/cropout:/' tools/archiver.yaml.example >tools/archiver.yaml
cd pmtests
python runall.py --root ..