From 3807102f4fe51bb197bdde762151218205438e6c Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:12:02 +0100 Subject: Added playwright integration. --- .github/workflows/tests.yml | 3 +++ Dockerfile | 4 ++++ Makefile | 2 +- requirements/tests.txt | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b2d1fcd9..b4664b5f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,9 @@ jobs: run: | python -m pip install --upgrade pip setuptools python -m pip install -r requirements/tests.txt + - name: Install playwright browsers + run: | + python -m playwright install --with-deps chromium - name: Set up databases run: | PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost diff --git a/Dockerfile b/Dockerfile index aa16fc2b..2788b3fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,10 @@ COPY ./requirements ./requirements RUN apt-get update \ && apt-get install --assume-yes --no-install-recommends ${BUILD_DEPENDENCIES} \ && python3 -m pip install --no-cache-dir -r ${REQ_FILE} \ + && if [ "${REQ_FILE}" = "requirements/tests.txt" ]; then \ + echo "Installing Playwright browsers..."; \ + python3 -m playwright install --with-deps chromium; \ + fi \ && apt-get purge --assume-yes --auto-remove ${BUILD_DEPENDENCIES} \ && apt-get distclean diff --git a/Makefile b/Makefile index c4de929f..41fd7cb8 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ APP_LIST ?= accounts aggregator blog checklists contact dashboard djangoproject SCSS = djangoproject/scss STATIC = djangoproject/static -ci: compilemessages test +ci: compilemessages collectstatics test @python -m coverage report compilemessages: diff --git a/requirements/tests.txt b/requirements/tests.txt index 06222b35..7a030122 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,4 +1,5 @@ -r dev.txt coverage==7.13.5 +playwright==1.59.0 requests-mock==1.12.1 tblib>=3.0.0 -- cgit v1.3