Skip to content

Commit

Permalink
add hiddnen files for upload-artifact action v4
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 24, 2024
1 parent 103a196 commit f49e9cf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,9 @@ jobs:
run: |
mv .github/.coveragerc .
- name: remove slashes from test name
run: |
test=$(echo ${{ matrix.test }} | sed 's/\//__/g')
echo "test=${test}" >> $GITHUB_ENV
- name: Test with pytest
run: |
python3 -m pytest tests/${{matrix.test}} --color=yes --cov --cov-data-file=.coverage.${{ env.test }} --durations=0 && exit_code=0|| exit_code=$?
echo "Current directory contents:"
ls -la
python3 -m pytest tests/${{matrix.test}} --color=yes --cov --durations=0 && exit_code=0|| exit_code=$?
# don't fail if no tests were collected, e.g. for test_licence.py
if [ "${exit_code}" -eq 5 ]; then
echo "No tests were collected"
Expand All @@ -149,18 +142,25 @@ jobs:
exit 1
fi
- name: remove slashes from test name
run: |
test=$(echo ${{ matrix.test }} | sed 's/\//__/g')
echo "test=${test}" >> $GITHUB_ENV
- name: Store snapshot report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
include-hidden-files: true
name: Snapshot Report ${{ env.test }}
path: ./snapshot_report.html

- name: Upload coverage
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
include-hidden-files: true
name: coverage_${{ env.test }}
path: .coverage.${{ env.test }}
path: .coverage

coverage:
needs: test
Expand Down

0 comments on commit f49e9cf

Please sign in to comment.