Skip to content

Run Tests and Generate Allure Report #21

Run Tests and Generate Allure Report

Run Tests and Generate Allure Report #21

name: Run Tests and Generate Allure Report
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: '127'
install-chromedriver: true
- name: Run tests
run: |
pytest -n auto --alluredir=allure-results
- uses: actions/upload-artifact@master
with:
name: allure-results
path: allure-results
retention-days: 20
- name: Get Allure history
uses: actions/checkout@v4.1.1
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
uses: simple-elf/allure-report-action@v1.9
if: always()
with:
allure_results: allure-results
allure_history: allure-history
keep_reports: 20
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.RTOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history