update pytest code

This commit is contained in:
femisan 2025-03-02 15:47:46 +09:00
parent 8a55ef2472
commit d9e8865b44

View file

@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest]
python-version: ["3.11"] python-version: ["3.11"]
steps: steps:
@ -48,6 +48,28 @@ jobs:
brew install ffmpeg opus brew install ffmpeg opus
fi fi
- name: Run tests with pytest # output the version of python and pip
- name: PyTest
run: | run: |
pytest --maxfail=5 --disable-warnings --tb=short python -m pytest test --junit-xml results/pytest.xml
continue-on-error: true
# Show the test results in the Actions tab
- name: Upload Unit Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: Unit Test Results (Python 3.7)
path: results/*.xml
- name: Download Artifacts
if: success() || failure()
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: artifacts/**/*.xml