Skip to content

chore: add pytest-xdist for parallel test execution #2

chore: add pytest-xdist for parallel test execution

chore: add pytest-xdist for parallel test execution #2

name: API autotests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Allure commandline
run: |
sudo npm install -g allure-commandline --unsafe-perm=true
- name: Run tests in parallel with Allure
run: pytest -n auto --alluredir=allure-results
- name: Generate Allure report
run: allure generate allure-results -o allure-report --clean
- name: Upload Allure report artifact
uses: actions/upload-artifact@v4
with:
name: allure-report
path: allure-report