Merge pull request #690 from voidking/unittest

pr trigger unittest, maintainer approve the unittest
This commit is contained in:
geekan 2024-01-05 18:23:32 +08:00 committed by GitHub
commit afa2411909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -2,10 +2,21 @@ name: Python application test
on:
workflow_dispatch:
pull_request:
branches:
- 'main'
- 'dev'
- '*-release'
push:
branches:
- 'main'
- 'dev'
- '*-release'
jobs:
build:
runs-on: ubuntu-latest
environment: unittest
strategy:
matrix:
# python-version: ['3.9', '3.10', '3.11']
@ -30,6 +41,11 @@ jobs:
- name: Show failed tests and overall summary
run: |
grep -E "FAILED tests|[0-9]+ passed," unittest.txt
failed_count=$(grep "FAILED" unittest.txt | wc -l)
if [[ "$failed_count" -gt 0 ]]; then
echo "$failed_count failed lines found! Task failed."
exit 1
fi
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
@ -40,4 +56,5 @@ jobs:
./tests/data/rsp_cache_new.json
retention-days: 3
if: ${{ always() }}

View file

@ -1,4 +1,4 @@
python -m pip install --upgrade pip
pip install -e .[test]
npm install -g @mermaid-js/mermaid-cli
playwright install --with-deps chromium
playwright install --with-deps