-
Notifications
You must be signed in to change notification settings - Fork 14
Create tox environment for running tests #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
be39430
a699c7e
2591ea4
a69b7b8
b16cfd8
f3b9b6c
7ef478e
f06217f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,4 @@ __pycache__ | |
| cloud-spanner-emulator* | ||
| emulator_main | ||
| gateway_main | ||
| .spanner_emulator/** | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # tox (https://tox.readthedocs.io/) is a tool for running tests | ||
| # in multiple virtualenvs. This configuration file will run the | ||
| # test suite on all supported python versions. To use it, "pip install tox" | ||
| # and then run "tox" from this directory. | ||
|
|
||
| [tox] | ||
| envlist = py36, py37, py38 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit) Remove 3.6, add 3.9. |
||
|
|
||
| [testenv] | ||
| deps = | ||
| absl-py | ||
| google-api-core | ||
| google-cloud-spanner >= 1.17.1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit) This doesn't match the other places, but I don't know what it should be. |
||
| frozendict | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit) This is out of date. |
||
| portpicker | ||
|
Comment on lines
+10
to
+15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any way to keep this in sync with other places? E.g. could we put this in a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While these can be put in a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ended up adding the below in a different PR because of the same issue with setup.py not referencing requirements.txt. Would it make sense to add requirements.txt here, and use it both for tox and the github workflow? Or would the github workflow use tox and not need to reference the dependencies explicitly anymore? |
||
| pytest | ||
| allowlist_externals = | ||
| wget | ||
| tar | ||
| chmod | ||
| setenv = | ||
| SPANNER_EMULATOR_VERSION=1.2.0 | ||
| SPANNER_EMULATOR_BINARY_PATH=.spanner_emulator/emulator_main | ||
| commands = | ||
| wget https://storage.googleapis.com/cloud-spanner-emulator/releases/{env:SPANNER_EMULATOR_VERSION}/cloud-spanner-emulator_linux_amd64-{env:SPANNER_EMULATOR_VERSION}.tar.gz -P .spanner_emulator/ | ||
| tar zxvf .spanner_emulator/cloud-spanner-emulator_linux_amd64-{env:SPANNER_EMULATOR_VERSION}.tar.gz -C .spanner_emulator/ | ||
| chmod u+x .spanner_emulator/gateway_main .spanner_emulator/emulator_main | ||
| pytest | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) add
/at the beginning of the line, so it only matches in this directory.