From 2ccf8be2a89b52fc14e2fd3514e6878cb86367ce Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Wed, 1 May 2024 14:24:17 -0400 Subject: [PATCH] Tweak build workflow to not run on readme changes Signed-off-by: Fabrice Normandin --- .github/workflows/build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8abf390..3ccf91e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,20 @@ name: Python package -on: [push, pull_request] +on: + push: + branches: + - master + paths-ignore: + - 'README.md' + pull_request: + paths-ignore: + - 'README.md' + +# https://stackoverflow.com/a/72408109/6388696 +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: linting: @@ -66,6 +80,7 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml flags: unittests env_vars: PLATFORM,PYTHON @@ -132,13 +147,14 @@ jobs: - name: Launch integration tests run: poetry run pytest --slow --cov=milatools --cov-report=xml --cov-append -vvv --log-level=DEBUG - timeout-minutes: 5 + timeout-minutes: 15 env: SLURM_CLUSTER: localhost - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml flags: integrationtests env_vars: PLATFORM,PYTHON