1
0
Fork 0
mirror of https://github.com/qurator-spk/dinglehopper.git synced 2025-06-09 20:00:01 +02:00
dinglehopper/.github/workflows/test.yml
Mike Gerber 774790c36f ✔ GitHub Actions: Make reporting results clearer
In the "Actions" tab on GitHub, the workflow run that would post test results to the
_original_ workflow run is named "Test Report". This would lead me to click on it to see
the results, just to be disappointed.

This aims to make the naming of the GitHub workflows/jobs clearer.
2025-04-25 11:20:00 +02:00

64 lines
1.6 KiB
YAML

name: 'Test'
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "00 16 07 * *" # = monthly
# Allow manually running (from GitHub Web)
workflow_dispatch:
# Allow calling this workflow (e.g. from release workflow)
workflow_call:
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
runs-on: "ubuntu-latest"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Checkout
uses: actions/checkout@v4
- name: Install possible lxml build requirements (if building from source)
run: sudo apt-get install -y libxml2-dev libxslt-dev python3-dev
- name: Install possible shapely build requirements (if building from source)
run: sudo apt-get install -y libgeos-dev
- name: Update pip
run: python3 -m pip install -U pip
- name: Install requirements*.txt
run: |
for requirements_txt in requirements*.txt; do
python3 -m pip install -r $requirements_txt;
done
- name: Test
run: |
cd src
python3 -m pytest --junitxml=../${{matrix.python-version}}-junit.xml -o junit_family=legacy
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{matrix.python-version}}
path: ${{matrix.python-version}}-junit.xml