Skip to content

feat: add support for custom xfail statuses in pytest #790

feat: add support for custom xfail statuses in pytest

feat: add support for custom xfail statuses in pytest #790

Workflow file for this run

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:
- "qase-api-client"
- "qase-api-v2-client"
- "qase-pytest"
- "qase-robotframework"
- "qase-python-commons"
- "qase-behave"
- "qase-tavern"
name: Project ${{ matrix.changed-dir }} - Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
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@v2
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:
[
"qase-api-client",
"qase-api-v2-client",
"qase-pytest",
"qase-robotframework",
"qase-python-commons",
"qase-behave",
"qase-tavern"
]
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
if: contains(github.event.ref, matrix.prefix)
uses: actions/setup-python@v2
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