Skip to content

Commit

Permalink
chore: pyright for github action
Browse files Browse the repository at this point in the history
  • Loading branch information
luochen1990 committed Jul 26, 2024
1 parent 269a707 commit d99b6bc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dev/test dependencies
run: |
python -m pip install --upgrade pip poetry
python -m pip install flake8 pytest pytest-xdist pytest-cov
python -m pip install flake8 pytest pytest-xdist pytest-cov pyright
- name: Install The Tested Package
run: |
if [[ "${{ github.event.head_commit.message }}" == "version:"* ]]; then
Expand All @@ -38,14 +38,17 @@ jobs:
THIS_PACKAGE_WHL=$(poetry build -f wheel | grep whl | rev | cut -d' ' -f1 | rev)
pip install ./dist/$THIS_PACKAGE_WHL
fi
- name: Test with pytest with coverage
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
pytest -s --cov=src
- name: Type checking with pyright
run: |
pyright
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
pytest -s --cov=src

0 comments on commit d99b6bc

Please sign in to comment.