Skip to content

Commit

Permalink
添加 PYTHONWARNINGS,提早发现错误
Browse files Browse the repository at this point in the history
  • Loading branch information
shinny-mayanqiong committed Jan 13, 2022
1 parent df437b3 commit a55e4e9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/run-tqsdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,18 @@ jobs:
python -m pip install --upgrade pip pytest memory_profiler pytest-cov pytest-xdist
python -m pip install Sphinx==3.3.1
python -m pip install -r requirements.txt
python -m pip install pytest-rerunfailures
- name: Run test case parallel
id: test_case_parallel
if: github.event.client_payload.tag_flag != 'true'
timeout-minutes: 90
shell: bash
env:
PYTHONWARNINGS: "error,ignore::FutureWarning:tqsdk.api,ignore::DeprecationWarning:tqsdk.channel,ignore::DeprecationWarning:asyncio.queues"
run: |
mkdir -p ${{ env.TESTLOGPATH }}
pytest tqsdk/test -W ignore::DeprecationWarning --cov=./tqsdk --cov-report xml:coverage1.xml --show-capture=no \
-n auto\
-m "not nonparalleltest" --disable-warnings\
pytest tqsdk/test --cov=./tqsdk --cov-report xml:coverage1.xml --show-capture=no -n auto -m "not nonparalleltest" --disable-warnings\
--log-level=ERROR --log-file-format="%(asctime)s - %(levelname)s - %(module)s:%(filename)s:%(lineno)d - %(message)s" --log-file-date-format="%Y-%m-%d %H:%M:%S" \
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
Expand All @@ -164,10 +165,10 @@ jobs:
if: github.event.client_payload.tag_flag != 'true'
timeout-minutes: 90
shell: bash
env:
PYTHONWARNINGS: "error,ignore::FutureWarning:tqsdk.api,ignore::DeprecationWarning:tqsdk.channel,ignore::DeprecationWarning:asyncio.queues,ignore:::selenium.*"
run: |
pip install pytest-rerunfailures
pytest tqsdk/test -W ignore::DeprecationWarning --cov=./tqsdk --cov-report xml:coverage2.xml\
-m nonparalleltest --disable-warnings\
pytest tqsdk/test --cov=./tqsdk --cov-report xml:coverage2.xml -m nonparalleltest --disable-warnings\
--log-level=ERROR --log-file-format="%(asctime)s - %(levelname)s - %(module)s:%(filename)s:%(lineno)d - %(message)s" --log-file-date-format="%Y-%m-%d %H:%M:%S" \
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
Expand Down

0 comments on commit a55e4e9

Please sign in to comment.