-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4a20e5
commit 60ef519
Showing
2 changed files
with
44 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: shared-steps | ||
|
||
runs: | ||
steps: | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
- name: Install Dev dependencies | ||
run: | | ||
pip install langchain openai pytest ruff mypy pymysql | ||
# TODO(yuanbohan): code coverage with pytest-cov | ||
- name: Test with pytest | ||
env: | ||
GREPTIMEAI_HOST: ${{ secrets.GREPTIMEAI_HOST }} | ||
GREPTIMEAI_USERNAME: ${{ secrets.GREPTIMEAI_USERNAME }} | ||
GREPTIMEAI_PASSWORD: ${{ secrets.GREPTIMEAI_PASSWORD }} | ||
GREPTIMEAI_DATABASE: ${{ secrets.GREPTIMEAI_DATABASE }} | ||
GREPTIMEAI_TOKEN: ${{ secrets.GREPTIMEAI_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
run: | | ||
pytest tests/ -v | ||
- name: Lint & Format with Ruff | ||
run: | | ||
ruff check --output-format=github . | ||
ruff format . | ||
- name: Static Type Checking with mypy | ||
run: | | ||
mypy $(git ls-files '*.py') --check-untyped-defs |