From 41a0fd92bf6233a758b10a785534f6186b567e16 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 25 Nov 2024 18:07:43 +0100 Subject: [PATCH] CI: Turn off verbose pytest output (#6633) Using verbose option for running `pytest` will give a long output in Github CI action and making it hard to check the error when it happens. Turn off the verbose will reduce the output and still have the error when tests failed. --- .github/workflows/ci-code.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test-install.yml | 2 +- .github/workflows/tests_nightly.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-code.yml b/.github/workflows/ci-code.yml index dfa3cc787..a8d0cb9a0 100644 --- a/.github/workflows/ci-code.yml +++ b/.github/workflows/ci-code.yml @@ -104,7 +104,7 @@ jobs: AIIDA_WARN_v3: 1 # Python 3.12 has a performance regression when running with code coverage # so run code coverage only for python 3.9. - run: pytest -v --db-backend psql -m 'not nightly' tests/ ${{ matrix.python-version == '3.9' && '--cov aiida' || '' }} + run: pytest --db-backend psql -m 'not nightly' tests/ ${{ matrix.python-version == '3.9' && '--cov aiida' || '' }} - name: Upload coverage report if: matrix.python-version == 3.9 && github.repository == 'aiidateam/aiida-core' diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9217e534f..84ed61712 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -129,7 +129,7 @@ jobs: id: tests env: AIIDA_WARN_v3: 0 - run: pytest -sv --db-backend sqlite -m 'requires_rmq' tests/ + run: pytest -s --db-backend sqlite -m 'requires_rmq' tests/ - name: Slack notification # Always run this step (otherwise it would be skipped if any of the previous steps fail) but only if the diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 524a625af..c47595bae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,7 +67,7 @@ jobs: uses: ./.github/actions/install-aiida-core - name: Run sub-set of test suite - run: pytest -sv -m requires_rmq --db-backend=sqlite tests/ + run: pytest -s -m requires_rmq --db-backend=sqlite tests/ publish: diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 75371449b..d315a5069 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -229,7 +229,7 @@ jobs: env: AIIDA_TEST_PROFILE: test_aiida AIIDA_WARN_v3: 1 - run: pytest -v --db-backend psql tests -m 'not nightly' tests/ + run: pytest --db-backend psql tests -m 'not nightly' tests/ - name: Freeze test environment run: pip freeze | sed '1d' | tee requirements-py-${{ matrix.python-version }}.txt diff --git a/.github/workflows/tests_nightly.sh b/.github/workflows/tests_nightly.sh index dbb1b92a8..2712a5124 100755 --- a/.github/workflows/tests_nightly.sh +++ b/.github/workflows/tests_nightly.sh @@ -13,4 +13,4 @@ verdi -p test_aiida run ${SYSTEM_TESTS}/test_containerized_code.py bash ${SYSTEM_TESTS}/test_polish_workchains.sh verdi daemon stop -AIIDA_TEST_PROFILE=test_aiida pytest -v --db-backend psql -m nightly tests/ +AIIDA_TEST_PROFILE=test_aiida pytest --db-backend psql -m nightly tests/