From cef90954c68977fa6ed51e3c8389d22567433e45 Mon Sep 17 00:00:00 2001 From: Andrey Khrolenok Date: Tue, 1 Jun 2021 16:03:46 +0300 Subject: [PATCH] Optimize py-test.yml --- .github/workflows/py-test.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/py-test.yml b/.github/workflows/py-test.yml index 0041162..fa04a96 100644 --- a/.github/workflows/py-test.yml +++ b/.github/workflows/py-test.yml @@ -60,16 +60,6 @@ jobs: flake8 ${{ env.package }} tests pylint ${{ env.package }} tests - - name: "Calculate coverage" - run: | - pytest --basetemp=$RUNNER_TEMP --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar --cov --cov-report= - ./bin/check_dirty - - - name: "Send coverage to Coveralls" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: coveralls --service=github - tests: name: "Test package" needs: lint @@ -78,7 +68,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9] # py38 was processed on lint job stage + python-version: [3.8 3.9] experimental: [false] include: - python-version: '3.10-dev' @@ -121,6 +111,19 @@ jobs: fi - name: "Run tests with pytest" + if: matrix.python-version != "3.8" run: | pytest --basetemp=$RUNNER_TEMP --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar ./bin/check_dirty + + - name: "Run tests with pytest & Calculate coverage" + if: matrix.python-version == "3.8" + run: | + pytest --basetemp=$RUNNER_TEMP --durations=10 -n auto --dist=loadfile -qq -o console_output_style=count -p no:sugar --cov --cov-report= + ./bin/check_dirty + + - name: "Send coverage to Coveralls" + if: matrix.python-version == "3.8" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: coveralls --service=github