Skip to content

Commit

Permalink
Changed logic in unit test yamls to improve reliability of unit test …
Browse files Browse the repository at this point in the history
…failure reporting.
  • Loading branch information
Rory Barnes committed Apr 22, 2024
1 parent e16b93e commit 537b1ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ jobs:
pip install pytest pytest-cov
sudo apt install lcov
- name: Run tests and generate coverage
- name: Run tests
id: test
if: steps.install.outcome == 'success'
shell: bash -l {0}
run: make coverage
run: |
make opt
pytest
- name: Check test ouptut created
id: check_test_file
Expand All @@ -51,6 +54,11 @@ jobs:
files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml"
fail: true

- name: Generate coverage
id: coverage
if: steps.test.outcome == 'success' && steps.check_test_file.outcome == 'success'
run: make coverage

- name: Get unique id
uses: Tiryoh/gha-jobid-action@v1
id: jobs
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests-macos-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
- name: Run tests
if: steps.setup_python.outcome == 'success'
run: make test
run: |
make opt
pytest
- name: Get unique id
uses: Tiryoh/gha-jobid-action@v1
Expand Down

0 comments on commit 537b1ec

Please sign in to comment.