code to handle pytest-asyncio event loops #17
This file contains 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: Playwright - Pytest automation suite | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Cache Poetry Virtualenv | |
id: cache-poetry | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
poetry-${{ runner.os }}- | |
- name: Install Dependencies | |
run: poetry install --no-interaction | |
- name: Install Playwright Browsers | |
run: poetry run playwright install --with-deps | |
- name: Run tests and generate allure reports | |
run: poetry run pytest --alluredir=allure-results |