qaseio: release 4.0.2 #362
Workflow file for this run
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
name: Python package | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
python-version: ['3.11', '3.10', '3.9', '3.8', '3.7'] | |
changed-dir: ["qaseio", "qase-pytest", "qase-robotframework", "qase-python-commons"] | |
name: Project ${{ matrix.changed-dir }} - Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
list-files: 'shell' | |
filters: | | |
changes: | |
- '${{ matrix.changed-dir }}/**' | |
- name: Set up Python ${{ matrix.python-version }} | |
if: steps.filter.outputs.changes == 'true' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
if: steps.filter.outputs.changes == 'true' | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions | |
- name: Run tox | |
if: steps.filter.outputs.changes == 'true' | |
working-directory: ./${{ matrix.changed-dir }} | |
run: | | |
tox | |
build-n-publish: | |
runs-on: ubuntu-latest | |
needs: test | |
strategy: | |
max-parallel: 1 | |
matrix: | |
prefix: [ "qaseio", "qase-pytest", "qase-robotframework", "qase-python-commons" ] | |
if: startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
if: contains(github.event.ref, matrix.prefix) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install build dependencies | |
if: contains(github.event.ref, matrix.prefix) | |
run: | | |
python -m pip install --upgrade pip setuptools wheel build | |
- name: Build the package | |
if: contains(github.event.ref, matrix.prefix) | |
working-directory: ./${{ matrix.prefix }} | |
run: | | |
python -m build | |
- name: Publish distribution to PyPI | |
if: contains(github.event.ref, matrix.prefix) | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_PASSWORD }} | |
packages_dir: ./${{ matrix.prefix }}/dist |