-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into from-methods-return-type
- Loading branch information
Showing
14 changed files
with
642 additions
and
205 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
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 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- 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: | | ||
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"}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Test OS | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
python-version: | ||
required: true | ||
type: string | ||
include: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
name: Test (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: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup locales | ||
if: startsWith(matrix.os, 'ubuntu') | ||
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 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
shell: bash | ||
- name: Test | ||
run: | | ||
pytest --junit-xml=test-results-py${{ matrix.python-version }}-xml.xml | ||
- name: Test with lxml | ||
run: | | ||
pip install lxml | ||
pytest --junit-xml=test-results-py${{ matrix.python-version }}-lxml.xml | ||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results (Python ${{ matrix.python-version }}, ${{ matrix.os }}) | ||
path: test-results-py*-*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://raw.githubusercontent.com/weiwei/junitparser/003587443fd6f332e9a6bd4b027e657a76cca033/tests/data/no_fails.xml | ||
junitparser verify no_fails.xml | ||
pip install lxml | ||
junitparser verify no_fails.xml |
Oops, something went wrong.