Edit correct workflow

release/4.3a0
p-zach 2025-02-15 19:27:57 -05:00
parent e22c31c636
commit 592ec4d7de
2 changed files with 31 additions and 29 deletions

View File

@ -1,9 +1,11 @@
name: Linux CI name: Linux CI
# Since this is a required check, specify paths-ignore in the check-paths job on:
# instead of under 'pull_request:'. Otherwise, the check is still required but pull_request:
# never runs, and a maintainer must bypass the check in order to merge the PR. paths-ignore:
on: [pull_request] - '**.md'
- '**.ipynb'
- 'myst.yml'
# Every time you make a push to your PR, it cancel immediately the previous checks, # Every time you make a push to your PR, it cancel immediately the previous checks,
# and start a new one. The other runner will be available more quickly to your PR. # and start a new one. The other runner will be available more quickly to your PR.
@ -12,26 +14,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
# Check paths to changed files to see if any are non-ignored.
check-paths:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.filter.outputs.changes_detected }}
steps:
- name: Check modified files
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
ignored:
- '!**.md'
- '!**.ipynb'
- '!myst.yml'
build: build:
# Only run build if relevant files have been modified in this PR.
needs: check-paths
if: needs.check-paths.outputs.should_run == 'true'
name: ${{ matrix.name }} ${{ matrix.build_type }} name: ${{ matrix.name }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -1,11 +1,9 @@
name: Python CI name: Python CI
on: # Since this is a required check, specify paths-ignore in the check-paths job
pull_request: # instead of under 'pull_request:'. Otherwise, the check is still required but
paths-ignore: # never runs, and a maintainer must bypass the check in order to merge the PR.
- '**.md' on: [pull_request]
- '**.ipynb'
- 'myst.yml'
# Every time you make a push to your PR, it cancel immediately the previous checks, # Every time you make a push to your PR, it cancel immediately the previous checks,
# and start a new one. The other runner will be available more quickly to your PR. # and start a new one. The other runner will be available more quickly to your PR.
@ -14,7 +12,28 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
# Check paths to changed files to see if any are non-ignored.
check-paths:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.filter.outputs.relevant_changes }}
steps:
- name: Check modified files
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
relevant_changes:
- '!**.md'
- '!**.ipynb'
- '!myst.yml'
- '**' # Match everything else
build: build:
# Only run build if relevant files have been modified in this PR.
needs: check-paths
if: needs.check-paths.outputs.should_run == 'true'
name: ${{ matrix.name }} ${{ matrix.build_type }} Python ${{ matrix.python_version }} name: ${{ matrix.name }} ${{ matrix.build_type }} Python ${{ matrix.python_version }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}