mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
update pytest code
This commit is contained in:
parent
8a55ef2472
commit
d9e8865b44
1 changed files with 25 additions and 3 deletions
28
.github/workflows/unit_test.yml
vendored
28
.github/workflows/unit_test.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.11"]
|
||||
|
||||
steps:
|
||||
|
|
@ -48,6 +48,28 @@ jobs:
|
|||
brew install ffmpeg opus
|
||||
fi
|
||||
|
||||
- name: Run tests with pytest
|
||||
# output the version of python and pip
|
||||
- name: PyTest
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue