Skip to content

Update python-app.yml #6

Update python-app.yml

Update python-app.yml #6

Workflow file for this run

name: Run tests and publish the report
on: [push]
jobs:
preparing:
runs-on: ubuntu-latest
steps:
- name: Install Allure command-line
run: |
wget -O allure-2.15.0.tgz https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.15.0/allure-commandline-2.15.0.tgz
tar -zxvf allure-2.15.0.tgz
export PATH=$PATH:$(pwd)/allure-2.15.0/bin
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest allure-pytest faker requests
- name: Run tests and generate Allure reports
run: |
pytest --alluredir=./allure-results
- name: Load test report history
uses: actions/checkout@v3
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build test report
run: |
allure generate --clean -o gh-pages/allure-results allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v3
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: gh-pages