Skip to content

Commit 17e3089

Browse files
[BE-375]修复 pytest 测试内存使用过大的问题
1 parent 08e2ac4 commit 17e3089

16 files changed

+89
-68
lines changed

.github/workflows/ci-linux-py3.6-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-linux-py3.7-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-linux-py3.8-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-macos-py3.6-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-macos-py3.7-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-macos-py3.8-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: |
6666
git lfs install
6767
git lfs pull
68-
python -m pip install --upgrade pip wheel setuptools pytest
68+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
6969
python -m pip install -r requirements.txt
7070
7171
- name: Run test case
7272
timeout-minutes: 60
7373
shell: bash
7474
run: |
7575
mkdir -p ${{ env.TESTLOGPATH }}
76-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
77-
--log-level=DEBUG \
76+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
77+
--log-level=ERROR \
7878
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
7979
8080
- name: Upload log to artifact

.github/workflows/ci-win-3.6-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ jobs:
6666
run: |
6767
git lfs install
6868
git lfs pull
69-
python -m pip install --upgrade pip wheel setuptools pytest
69+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
7070
python -m pip install -r requirements.txt
7171
7272
- name: Run test case
7373
timeout-minutes: 60
7474
shell: bash
7575
run: |
7676
mkdir -p ${{ env.TESTLOGPATH }}
77-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
78-
--log-level=DEBUG \
77+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
78+
--log-level=ERROR \
7979
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
8080
8181
- name: Upload log to artifact

.github/workflows/ci-win-3.6-x86.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ jobs:
6666
run: |
6767
git lfs install
6868
git lfs pull
69-
python -m pip install --upgrade pip wheel setuptools pytest
69+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
7070
python -m pip install -r requirements.txt
7171
7272
- name: Run test case
7373
timeout-minutes: 60
7474
shell: bash
7575
run: |
7676
mkdir -p ${{ env.TESTLOGPATH }}
77-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
78-
--log-level=DEBUG \
77+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
78+
--log-level=ERROR \
7979
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
8080
8181
- name: Upload log to artifact

.github/workflows/ci-win-3.7-x64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ jobs:
6666
run: |
6767
git lfs install
6868
git lfs pull
69-
python -m pip install --upgrade pip wheel setuptools pytest
69+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
7070
python -m pip install -r requirements.txt
7171
7272
- name: Run test case
7373
timeout-minutes: 60
7474
shell: bash
7575
run: |
7676
mkdir -p ${{ env.TESTLOGPATH }}
77-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
78-
--log-level=DEBUG \
77+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
78+
--log-level=ERROR \
7979
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
8080
8181
- name: Upload log to artifact

.github/workflows/ci-win-3.7-x86.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ jobs:
6666
run: |
6767
git lfs install
6868
git lfs pull
69-
python -m pip install --upgrade pip wheel setuptools pytest
69+
python -m pip install --upgrade pip wheel setuptools pytest pytest-rerunfailures memory_profiler
7070
python -m pip install -r requirements.txt
7171
7272
- name: Run test case
7373
timeout-minutes: 60
7474
shell: bash
7575
run: |
7676
mkdir -p ${{ env.TESTLOGPATH }}
77-
python -W ignore::DeprecationWarning -m pytest --no-print-logs \
78-
--log-level=DEBUG \
77+
python -W ignore::DeprecationWarning -m pytest --show-capture=no \
78+
--log-level=ERROR \
7979
--log-file=${{ env.TESTLOGPATH }}${{ env.TESTLOGNAME }}.log
8080
8181
- name: Upload log to artifact

0 commit comments

Comments
 (0)