Skip to content

Migrate to setuptools build backend #38

Migrate to setuptools build backend

Migrate to setuptools build backend #38

Workflow file for this run

name: CI
on:
push:
branches: ["master"]
tags:
- "*"
pull_request:
branches: ["master"]
workflow_dispatch:
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
test-linux:
name: "Test Ubuntu"
uses: "./.github/workflows/test-os.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"},
]
test-win:
name: "Test Windows"
uses: "./.github/workflows/test-os.yml"
with:
os: '["windows-2025"]'
# alive Python versions
python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
# EOL Python versions
include: >
[
{"os": "windows-2019", "python-version": "3.6"},
{"os": "windows-2019", "python-version": "3.7"},
{"os": "windows-2022", "python-version": "3.8"},
]
test-mac:
name: "Test macOS"
uses: "./.github/workflows/test-os.yml"
with:
os: '["macos-15"]'
# alive Python versions
python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
# EOL Python versions
include: >
[
{"os": "macos-13", "python-version": "3.6"},
{"os": "macos-13", "python-version": "3.7"},
{"os": "macos-14", "python-version": "3.8"},
]
coverage-lint:
name: "Coverage & Lint"
needs: ["test-linux", "test-win", "test-mac"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Setup locales
run: |
sudo locale-gen en_US.UTF-8
sudo locale-gen de_DE.UTF-8
sudo update-locale
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lxml flake8 pytest coverage
- name: Lint with flake8
run: |
# The GitHub editor is 127 chars wide
flake8 . --count --max-complexity=10 --max-line-length=127 --show-source --statistics
- name: Test and coverage
run: |
coverage run -m pytest
bash <(curl -s https://codecov.io/bash)
package-publish:
name: "Publish Package"
needs: coverage-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Build packages
run: |
pip install build
python -m build
ls -lah dist/
echo "=== sources ==="
tar -tzvf dist/junitparser-*.tar.gz
echo "=== wheel ==="
unzip -l dist/junitparser-*.whl
echo "=== metadata ==="
unzip -p dist/junitparser-*.whl junitparser-*.dist-info/METADATA
- 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"},
]