Skip to content

Install and cache Playwright browsers in CI #80

Install and cache Playwright browsers in CI

Install and cache Playwright browsers in CI #80

Workflow file for this run

name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e . --group dev
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: |
~/.cache/ms-playwright/
~/Library/Caches/ms-playwright/
~\AppData\Local\ms-playwright\
key: ${{ runner.os }}-playwright
- name: Install Playwright browsers
run: |
python -m playwright install chromium
- name: Run tests
env:
PYTHONUTF8: "1"
run: |
python -m pytest