Skip to content

setup Python 3.13 and enforce virtual environment creation #46

setup Python 3.13 and enforce virtual environment creation

setup Python 3.13 and enforce virtual environment creation #46

Workflow file for this run

name: UI Tests
on:
push:
branches:
- main
jobs:
ui-tests:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Setup Python version and create virtual environment
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'
# Install dependencies and Playwright browsers
- name: Install dependencies and Playwright
run: |
python -m venv .venv
source .venv/bin/activate
pip install pdm
pdm install --prod --no-self --no-editable
pdm run playwright install chromium
# Set environment variable to headless mode
- name: Set headless mode
run: echo "HEADLESS=true" >> $GITHUB_ENV
# Install Allure
- name: Install Allure
run: |
sudo apt-get update
sudo apt-get install -y openjdk-17-jre
curl -o allure.tgz -Ls https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.30.0/allure-commandline-2.30.0.tgz
tar -zxvf allure.tgz -C /opt/
sudo ln -s /opt/allure-2.30.0/bin/allure /usr/bin/allure
rm allure.tgz
# Run UI tests with Playwright and Allure
- name: Run UI tests
env:
LOGIN: ${{ secrets.LOGIN }}
PASSWORD: ${{ secrets.PASSWORD }}
run: |
source .venv/bin/activate
pdm run pytest -sv --alluredir=allure-results
continue-on-error: true
# List Allure results
- name: List Allure results
run: ls -la allure-results
# Generate Allure report
- name: Generate Allure report
run: allure generate allure-results --clean -o allure-report
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.CI_TOKEN }}
branch: gh-pages
folder: allure-report