Skip to content

Commit

Permalink
Move BrowserTests.Dockerfile to browser-tests/Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Feb 21, 2025
1 parent a0339df commit 3610815
Show file tree
Hide file tree
Showing 8 changed files with 1,771 additions and 862 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ target/

# misc
autograph-certs/chains
tests/pyproject.toml
mail/*.eml
attachments/
.DS_Store
Expand Down
File renamed without changes.
8 changes: 3 additions & 5 deletions BrowserTests.Dockerfile → browser-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN python -m venv $POETRY_HOME && \

WORKDIR /opt
COPY pyproject.toml poetry.lock ./
RUN $POETRY_HOME/bin/poetry install --only browser-tests --no-root
RUN $POETRY_HOME/bin/poetry install --no-root

FROM python:3.13.2

Expand All @@ -25,14 +25,12 @@ ENV PATH="/opt/.venv/bin:$PATH" \
VIRTUAL_ENV=/opt/.venv \
PYTHONPATH="/app:$PYTHONPATH"

COPY /bin/update_and_install_system_packages.sh /opt
RUN /opt/update_and_install_system_packages.sh wget
RUN apt-get update && apt-get -y install wget

COPY --from=build $VIRTUAL_ENV $VIRTUAL_ENV

RUN playwright install --with-deps firefox

WORKDIR /app
COPY browser-tests/ pyproject.toml ./
# ./browser-tests/run.sh, not ./bin/run.sh
COPY . .
ENTRYPOINT ["/app/run.sh"]
1,620 changes: 1,620 additions & 0 deletions browser-tests/poetry.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions browser-tests/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "browser-tests"
version = "0"
description = "Browser tests"
authors = ["Contactless <postmaster@localhost>"]

[tool.poetry.dependencies]
python = ">=3.11, <3.14"
aiohttp = "3.11.12"
autograph-utils = "1.0.1"
canonicaljson-rs = "0.7.1"
httpie = "3.2.4"
kinto-http = "11.7.1"
pytest = "8.3.4"
webtest = "3.0.4"
playwright = "1.50.0"
pytest-playwright = "0.7.0"
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ services:

browser-tests:
build:
dockerfile: BrowserTests.Dockerfile
context: .
context: browser-tests/
image: remotesettings/browser-tests
profiles: [browser-tests]
depends_on:
Expand Down
970 changes: 130 additions & 840 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ coverage = "7.6.12"
detect-secrets = "^1.5.0"
ruff = "^0.9.6"

[tool.poetry.group.browser-tests]
optional = true

[tool.poetry.group.browser-tests.dependencies]
aiohttp = "3.11.12"
autograph-utils = "1.0.1"
canonicaljson-rs = "0.7.1"
httpie = "3.2.4"
kinto-http = "11.7.1"
pytest = "8.3.4"
webtest = "3.0.4"
playwright = "1.50.0"
pytest-playwright = "0.7.0"

[tool.poetry.group.docs]
optional = true

Expand Down

0 comments on commit 3610815

Please sign in to comment.