Skip to content

Commit

Permalink
Tweak build workflow to not run on readme changes
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed May 1, 2024
1 parent 400bc30 commit 2ccf8be
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2ccf8be

Please sign in to comment.