Add distinct playwright workflow #7
Workflow file for this run
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: Run tests | |
on: | |
push: | |
branches: [ "main", "ci" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: chartboost/ruff-action@v1 | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
django-version: [ "4.2", "5.0", "5.1", "main" ] | |
exclude: | |
# Django 5.0 | |
- python-version: 3.9 | |
django-version: 5.0 | |
# Django 5.1 | |
- python-version: 3.9 | |
django-version: 5.1 | |
# Django main | |
- python-version: 3.9 | |
django-version: "main" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: | | |
python -m pip install poetry==1.8.3 | |
- name: Configure poetry | |
run: | | |
python -m poetry config virtualenvs.in-project true | |
- name: Cache the virtualenv | |
uses: actions/cache@v4 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
python -m poetry install | |
- run: python -m poetry run python -m pip install -U Django==${{ matrix.django-version }} | |
if: matrix.django-version != 'main' | |
- run: python -m poetry run python -m pip install -U https://github.com/django/django/archive/master.tar.gz | |
if: matrix.django-version == 'main' | |
- name: Run tests | |
run: | | |
python -m poetry run python -m pytest -sxv -m 'not pw' |