diff --git a/.github/workflows/run-tqsdk.yml b/.github/workflows/run-tqsdk.yml index 514fd65..09f8c28 100644 --- a/.github/workflows/run-tqsdk.yml +++ b/.github/workflows/run-tqsdk.yml @@ -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 @@ -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