Skip to content

Commit

Permalink
chore: fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
luochen1990 committed Aug 9, 2024
1 parent 264f675 commit c19b939
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .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 pyright
python -m pip install flake8 pytest pytest-asyncio pytest-cov pytest-xdist pyright
- name: Install This Package
run: |
if [[ "${{ github.event.head_commit.message }}" == "version:"* ]]; then
Expand All @@ -44,6 +44,7 @@ jobs:
OPENAI_BASE_URL: https://api.deepseek.com
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GOOGLE_ENGINE_ID: ${{ secrets.GOOGLE_ENGINE_ID }}
DEBUG: True
run: |
if [[ "${{ github.event.head_commit.message }}" == "version:"* ]]; then
echo "This is a version bump commit, run test without coverage."
Expand All @@ -55,12 +56,17 @@ jobs:
if [ -n "$RUNNER_DEBUG" || -n "$COV_ARG" ]; then
export DEBUG=True
else
export DEBUG=False
fi
if [ -n "$RUNNER_DEBUG" ]; then
DBG_ARG="-n0 -s"
else
DBG_ARG=""
fi
echo DBG_ARG="$DBG_ARG" COV_ARG="$COV_ARG"
pytest $DBG_ARG $COV_ARG
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit c19b939

Please sign in to comment.