Skip to content

Latest commit

 

History

History
134 lines (76 loc) · 2.7 KB

development.rst

File metadata and controls

134 lines (76 loc) · 2.7 KB

Development

This guide provides instructions for running tests and executing buildrunner locally during development.

Unit tests

The unit tests use pytest. To run the tests, execute the following commands:

  1. Clone the buildrunner repository
git clone https://github.com/adobe/buildrunner.git
  1. Navigate to the root of the buildrunner repository
  2. Setup virtual environment
python -m venv venv
source venv/bin/activate
  1. Install requirements
pip install -r requirements.txt
  1. Install test requirements
pip install -r test_requirements.txt
  1. Run the tests

    Run all the tests by typing pytest

    pytest

    To run a specific test file, provide the path to the file

    pytest tests/test_buildrunner.py

Locally

To run buildrunner locally in the buildrunner directory it is best to use the run-buildrunner.sh script. This ensures that the latest local changes are used when running buildrunner. The examples/ directory contains example buildrunner configuration files that can be used to test the functionality of buildrunner. To use this script follow these steps:

  1. Clone the buildrunner repository
git clone https://github.com/adobe/buildrunner.git
  1. Navigate to the root of the buildrunner repository
  2. Setup virtual environment
python -m venv venv
source venv/bin/activate
  1. Install requirements
pip install -r requirements.txt
  1. Run the script
./run-buildrunner.sh -f examples/build/basic/buildrunner.yaml

Another repository

It is also possible to install and run a working version of buildrunner in another repository. To do this, follow these steps:

  1. Clone the buildrunner repository
git clone https://github.com/adobe/buildrunner.git
  1. Navigate to the root of the desired repository
  2. Setup virtual environment
python -m venv venv
source venv/bin/activate
  1. Install buildrunner
pip install ..</path/to>/buildrunner
  1. Reactivate the virtual environment
deactivate
source venv/bin/activate
  1. Run buildrunner
buildrunner --help

Note

You can verify that you are using the correct buildrunner by typing which buildrunner and ensuring that the path is to the virtual environment (i.e. venv/).