Skip to content

Commit

Permalink
pytest workflow - retry with gpt-4 if gpt-4o fails
Browse files Browse the repository at this point in the history
  • Loading branch information
pchalasani committed May 16, 2024
1 parent 256a243 commit 4e05a51
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,19 @@ jobs:
name: github-dependencies
path: requirements_github.txt

- name: Run tests with coverage
- name: Run tests with coverage (exit on first failure)
id: first_test
run: |
poetry run coverage run --source=langroid -m pytest -x tests/main tests/extras/test_hf_embeddings.py
poetry run coverage report
continue-on-error: true

- name: Retry pytest with gpt-4 instead of gpt-4o
if: steps.first_test.outcome == 'failure'
run: |
poetry run coverage run --source=langroid -m pytest -x tests/main tests/extras/test_hf_embeddings.py --m gpt-4
poetry run coverage report
- name: Generate XML coverage report
run: |
poetry run coverage xml
Expand Down

0 comments on commit 4e05a51

Please sign in to comment.