Developer Setup
Below are step-by-step instructions on how to set up a development environment in order to be able to successfully contribute to and execute the ecosystem test scripts.
1. Clone the ecosystem-test-scripts repository
The ecosystem test scripts are hosted on the Mozilla Github and can be cloned using the method of your choice (see Cloning a repository). Contributors should follow the Contributing Guidelines and Community Participation Guidelines for the repository.
2. Create a CircleCI API Token
In order to execute the circleci_scraper
script, a personal CircleCI API Token is needed. To
create a token, follow the creating a personal api token CircleCI instructions. Store the key
value in a safe place.
DO NOT SHARE YOUR CIRCLECI API TOKEN
3. Copy the Google Sheet Service Account JSON Key
The google_sheet_uploader
script is set up using the ecosystem-test-eng GCP project with the
metric-gsheet service account. In order to execute the google_sheet_uploader
script, a
key for this service account, in the form of a JSON file, needs to be copied from the 1Password
Ecosystem Test Engineering Team Vault into the root directory of the ecosystem-test-scripts
project.
4. Set up the config.ini
All settings for the ecosystem-test-scripts
are defined in the config.ini
file. To set up a
local config.ini
file:
4.1 Make a copy of the config.ini.sample
file found in the root directory of the
ecosystem-test-scripts
project and rename it to config.ini
4.2 Under the [circleci_scraper]
section of the file, set the token
value to the CircleCI API
key created in step 2
5. Copy the latest raw data locally
By default, CircleCI has a retention policy of 30 days for artifacts and 90 days for uploaded test
results; However, we have over a years worth of data gathered for some projects. In order to produce
reports with full trend data and reduce scraping time, copy the latest raw_data
from the
ETE team folder to the root directory of the ecosystem-test-scripts
project.
6. Set up the python virtual environment
This project uses Poetry for dependency management in conjunction with a pyproject.toml file. While you can use virtualenv to set up the dev environment, it is recommended to use pyenv and pyenv-virtualenv, as they work nicely with Poetry. Once poetry is installed, dependencies can be installed using the following Make command from the root directory:
make install
For more information on Make commands, run:
make help