Pytest with Allure Report (Simple) #1
Workflow file for this run
This file contains hidden or 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: Pytest with Allure Report (Simple) | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system pytest allure-pytest pytest-xdist | |
| # Add your other dependencies here | |
| - name: Install Allure | |
| run: | | |
| wget -q https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.tgz | |
| tar -zxf allure-2.25.0.tgz -C /opt/ | |
| sudo ln -s /opt/allure-2.25.0/bin/allure /usr/bin/allure | |
| - name: Run tests | |
| run: | | |
| pytest tests/ \ | |
| --alluredir=allure-results \ | |
| -v \ | |
| -n 4 | |
| continue-on-error: true | |
| - name: Generate report | |
| if: always() | |
| run: allure generate allure-results -o allure-report --clean | |
| - name: Archive Allure report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report-${{ github.ref_name }} | |
| path: allure-report | |
| - name: Instructions | |
| if: always() | |
| run: | | |
| echo "📊 Download the 'allure-report' artifact and open index.html in a browser to view the report" |