Skip to content

Commit

Permalink
Add section on how to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN committed Nov 3, 2020
1 parent 82e44f1 commit 3194510
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-t

*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*

## Running Tests Locally

1. Go to your Contrib repo directory. `cd ~/git/opentelemetry-python-contrib`.
2. Create a virtual env in your Contrib repo directory. `python3 -m venv my_test_venv`.
3. Activate your virtual env. `source my_test_venv/bin/activate`.
4. Clone the [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python) Python Core repo to a folder named `opentelemetry-python-core`. `git clone git@github.com:open-telemetry/opentelemetry-python.git opentelemetry-python-core`.
5. Change directory to the repo that was just cloned. `cd opentelemetry-python-core`.
6. Move the head of this repo to the hash you want your tests to use. This is currently the tag `v0.15b0` as seen in `.github/workflows/test.yml`. Use `git fetch --tags && git checkout v0.15b0`.
7. Go back to the root directory. `cd ../`.
8. Make sure you have `tox` installed. `pip install tox`.
9. Run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)

### Thanks to all the people who already contributed!

<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/graphs/contributors">
Expand Down

0 comments on commit 3194510

Please sign in to comment.