-
Clone this repo.
-
Copy the Git pre-commit hooks. This will automatically check the build, run tests, and perform linting before each commit. (Symlinks don't seem to work, but if you find a way, please add it here!)
cp .githooks/pre-commit .git/hooks/pre-commit
-
Install dependencies with
pip install .
Execute unit tests by running one of the sessions prefixed with unit-.
- Example:
nox -s unit-3.8 - See all Nox sessions with
nox -l.
-
Lint sources by running
autopep8. The specific command is the following.find gapic tests -name "*.py" -not -path 'tests/**/goldens/*' | xargs autopep8 --diff --exit-code -
Format sources in place:
find gapic tests -name "*.py" -not -path 'tests/**/goldens/*' | xargs autopep8 --in-place
-
Run a single integration test for one API. This generates Python source code with the microgenerator and compares them to the golden files in
tests/integration/goldens/asset.bazel test //tests/integration:asset -
Run integration tests for all APIs.
bazel test //tests/integration:all -
Update all goldens files. This overwrites the golden files in
tests/integration/goldens/.bazel run //tests/integration:asset_update bazel run //tests/integration:credentials_update bazel run //tests/integration:eventarc_update bazel run //tests/integration:logging_update bazel run //tests/integration:redis_update