Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(openchallenges): add browsers for e2e testing with Playwright to the dev container #2391

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions tools/devcontainers/sage/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ARG rVersion="4.2.3"
ARG trivyVersion="0.44.1"
# https://github.com/rstudio/renv
ARG renvVersion="1.0.0"
# https://www.npmjs.com/package/playwright
ARG playwrightVersion="1.40.1"
# https://github.com/pnpm/pnpm/releases
ARG pnpmVersion="8.7.0"
# https://github.com/SonarSource/sonar-scanner-cli/releases
Expand All @@ -47,7 +49,12 @@ RUN groupadd docker \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev \
# Add Node.js repository
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& NODE_MAJOR=18 \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
| tee /etc/apt/sources.list.d/nodesource.list \
# Add GitHub CLI repository
&& curl -sSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
Expand Down Expand Up @@ -155,8 +162,14 @@ RUN curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-s

USER $user

# Install pyenv as the user
RUN curl https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash -
# Install browsers used for e2e testing with Playwright
# Note: The version of Playwright should be the same as the one used by your project (package.json)
RUN npx playwright@${playwrightVersion} install --with-deps \
chromium \
firefox \
webkit \
# Install pyenv as the user
&& curl https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash -

# Install Python environments
ENV PYENV_ROOT /home/${user}/.pyenv
Expand Down