Skip to content

Commit

Permalink
Avoid duplicated CI workflow if push+PR
Browse files Browse the repository at this point in the history
  • Loading branch information
BerengerBerthoul committed Jan 14, 2025
1 parent 7c16a03 commit 9388648
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
env:
PYTEST_DISABLE_PLUGIN_AUTOLOAD: 1 # To ensure that Autoload do not change test behavior

# A workflow run is made up of one or more jobs that
# can run sequentially or in parallel
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
pylint:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -33,6 +33,7 @@ jobs:
pylint --unsafe-load-any-extension=y --disable=fixme $(git ls-files '*.py') || true
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
needs: [pylint]
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit 9388648

Please sign in to comment.