-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Carlos Kidman <carlos@qap.dev>
- Loading branch information
Showing
5 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM gitpod/workspace-full-vnc | ||
|
||
USER root | ||
|
||
# RUN apt-get update -qqy && apt-get install -y wget curl gnupg2 | ||
|
||
# So we can install browsers and browser drivers later | ||
RUN wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | ||
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | ||
RUN mkdir -p /home/gitpod/selenium /var/run/supervisor /var/log/supervisor && \ | ||
chmod -R 777 /var/run/supervisor /var/log/supervisor | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Browsers | ||
RUN apt-get update -qqy && \ | ||
apt-get -qy install google-chrome-stable firefox && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
# Browser Drivers | ||
RUN CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \ | ||
&& CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}") \ | ||
&& echo "Using ChromeDriver version: "$CHROME_DRIVER_VERSION \ | ||
&& wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ | ||
&& rm -rf /home/gitpod/selenium/chromedriver \ | ||
&& unzip /tmp/chromedriver_linux64.zip -d /home/gitpod/selenium \ | ||
&& rm /tmp/chromedriver_linux64.zip \ | ||
&& mv /home/gitpod/selenium/chromedriver /home/gitpod/selenium/chromedriver-$CHROME_DRIVER_VERSION \ | ||
&& chmod 755 /home/gitpod/selenium/chromedriver-$CHROME_DRIVER_VERSION \ | ||
&& sudo ln -fs /home/gitpod/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver | ||
RUN GK_VERSION="0.31.0" \ | ||
&& echo "Using GeckoDriver version: "$GK_VERSION \ | ||
&& wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GK_VERSION/geckodriver-v$GK_VERSION-linux64.tar.gz \ | ||
&& rm -rf /home/gitpod/selenium/geckodriver \ | ||
&& tar -C /home/gitpod/selenium -zxf /tmp/geckodriver.tar.gz \ | ||
&& rm /tmp/geckodriver.tar.gz \ | ||
&& mv /home/gitpod/selenium/geckodriver /home/gitpod/selenium/geckodriver-$GK_VERSION \ | ||
&& chmod 755 /home/gitpod/selenium/geckodriver-$GK_VERSION \ | ||
&& ln -fs /home/gitpod/selenium/geckodriver-$GK_VERSION /usr/bin/geckodriver | ||
|
||
# To run browser tests | ||
ENV DISPLAY :99.0 | ||
ENV DISPLAY_NUM 99 | ||
ENV SCREEN_WIDTH 1360 | ||
ENV SCREEN_HEIGHT 1020 | ||
ENV SCREEN_DEPTH 24 | ||
ENV SCREEN_DPI 96 | ||
ENV VNC_PORT 5900 | ||
ENV NO_VNC_PORT 7900 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
vscode: | ||
extensions: | ||
- ms-python.python | ||
- bungcip.better-toml | ||
- PKief.material-icon-theme | ||
|
||
image: | ||
file: .gitpod.Dockerfile | ||
|
||
tasks: | ||
- name: "Setup" | ||
command: | | ||
git config --global pull.rebase false | ||
pip install poetry | ||
poetry install | ||
ports: | ||
- port: 5900 | ||
onOpen: ignore | ||
- port: 6080 | ||
onOpen: open-browser | ||
- port: 10000 | ||
onOpen: ignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
{ | ||
"python.testing.pytestArgs": ["tests"], | ||
"python.defaultInterpreterPath": ".venv/bin/python", | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
"python.testing.pytestEnabled": true, | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/*.crswap": true, | ||
"**/*.pytest_cache": true, | ||
"**/*__pycache__": true | ||
}, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"workbench.iconTheme": "material-icon-theme" | ||
} |
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
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