-
Notifications
You must be signed in to change notification settings - Fork 0
/
set_up.sh
22 lines (18 loc) · 1.12 KB
/
set_up.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This script does the following:
# - sets up a Python virtual environment in the Ubuntu runner for GitHub Actions
# - installs all prerequisites for running the `browserstack_script.py` file in the Ubuntu runner for GitHub Actions
# the file `browserstack_script.py` on a Ubuntu runner.
#
# You can also run this script to set up your environment and dependencies.
#
# Check out the list of preinstalled packages for Ubuntu 22.04: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
# Set up and activate a Python virtual environment in the project directory.
# Assumption: Current directory is the project directory.
python -m venv browserstack
source browserstack/bin/activate
# Install selenium v 4.1.0
python -m pip install selenium==4.1.0
# Install python-dotenv package for handling environment variables from the test script
pip install python-dotenv
# Note: Because the selenium webdrivers invoke headless Chrome and Firefox in the remote BrowserStack Cloud,
# the Ubuntu runner need not have the specific versions of Chrome and Firefox drivers as mentioned in `browserstack_script.py`.