You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
YAML
59 lines
1.3 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" ]
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- 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@v3
|
|
if: success() || failure()
|
|
with:
|
|
name: test-results-${{matrix.python-version}}
|
|
path: ${{matrix.python-version}}-junit.xml
|