This library follows Semantic Versioning.
This repository uses tool Release Please to create GitHub and PyPi releases. It does so by parsing your git history, looking for Conventional Commit messages, and creating release PRs.
Learn more by reading How should I write my commits?
-
Set env vars:
DB_HOST
,DB_PORT
,DB_NAME
,DB_USER
,DB_PASSWORD
-
Run pytest to automatically run all tests:
pytest
Cloud Build is used to run tests against Google Cloud resources in test project: prow-build-graybox.
Each test has a corresponding Cloud Build trigger, see all triggers.
These tests are registered as required tests in .github/sync-repo-settings.yaml
.
Cloud Build triggers (for Python versions 3.8 to 3.11) were created with the following specs:
name: integration-test-pr-py38
description: Run integration tests on PR for Python 3.8
filename: integration.cloudbuild.yaml
github:
name: langchain-google-firestore-python
owner: googleapis
pullRequest:
branch: .*
commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
ignoredFiles:
- docs/**
- .kokoro/**
- .github/**
- "*.md"
substitutions:
_VERSION: "3.8"
_DB_HOST: <>
_DB_PORT: <>
_DB_NAME: <>
_DB_USER: <>
Use gcloud builds triggers import --source=trigger.yaml
create triggers via the command line
- Create an GKE Cluster with El Carro database
- Setup Cloud Build triggers (above)
-
Run integration test:
gcloud builds submit --config integration.cloudbuild.yaml --substitutions=,_DB_HOST=$DB_HOST,_DB_PORT=$DB_PORT,_DB_NAME=$DB_NAME,_DB_USER=$DB_USER,_DB_PASSWORD=$DB_PASSWORD
To run Cloud Build tests on GitHub from external contributors, ie RenovateBot, comment: /gcbrun
.