Skip to content

Commit

Permalink
ci: Remove logging during testing
Browse files Browse the repository at this point in the history
Removed capturing the output of pytest into a log
using 'tee'. This way the proper exit code should be propagated.

The logs are currently now looked at much anyways! :)
------

Ref: Issue #1140
  • Loading branch information
lsetiawan committed Aug 29, 2023
1 parent 11d6504 commit 206f9fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ jobs:
- name: Running All Tests
shell: bash -l {0}
run: |
pytest -vv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
- name: Upload ci test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: ci_test_log
path: ci_${{ matrix.python-version }}_test_log.log
pytest -vv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,11 @@ jobs:
- name: Running all Tests
if: contains(github.event.pull_request.title, '[all tests ci]')
run: |
pytest -vvv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
pytest -vvv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings
- name: Running Tests
if: ${{ !contains(github.event.pull_request.title, '[all tests ci]') }}
run: |
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vvv,-rx,--numprocesses=${{ env.NUM_WORKERS }},--max-worker-restart=3,--disable-warnings" --include-cov ${{ steps.files.outputs.added_modified_renamed }} |& tee ci_${{ matrix.python-version }}_test_log.log
- name: Upload ci test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: ci_test_log
path: ci_${{ matrix.python-version }}_test_log.log
python .ci_helpers/run-test.py --pytest-args="--log-cli-level=WARNING,-vvv,-rx,--numprocesses=${{ env.NUM_WORKERS }},--max-worker-restart=3,--disable-warnings" --include-cov ${{ steps.files.outputs.added_modified_renamed }}
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit 206f9fc

Please sign in to comment.