[CI/Build] Limit github CI jobs based on files changed (#9928)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant 2024-11-05 13:30:42 -05:00 committed by GitHub
parent 09d3550372
commit 731aec5be7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 45 additions and 5 deletions

View File

@ -6,12 +6,14 @@ on:
paths: paths:
- '.github/workflows/*.ya?ml' - '.github/workflows/*.ya?ml'
- '.github/workflows/actionlint.*' - '.github/workflows/actionlint.*'
- '.github/workflows/matchers/actionlint.json'
pull_request: pull_request:
branches: branches:
- "main" - "main"
paths: paths:
- '.github/workflows/*.ya?ml' - '.github/workflows/*.ya?ml'
- '.github/workflows/actionlint.*' - '.github/workflows/actionlint.*'
- '.github/workflows/matchers/actionlint.json'
env: env:
LC_ALL: en_US.UTF-8 LC_ALL: en_US.UTF-8

View File

@ -6,9 +6,21 @@ on:
push: push:
branches: branches:
- main - main
paths:
- '**/*.h'
- '**/*.cpp'
- '**/*.cu'
- '**/*.cuh'
- '.github/workflows/clang-format.yml'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '**/*.h'
- '**/*.cpp'
- '**/*.cu'
- '**/*.cuh'
- '.github/workflows/clang-format.yml'
jobs: jobs:
clang-format: clang-format:

View File

@ -6,9 +6,19 @@ on:
push: push:
branches: branches:
- main - main
paths:
- '**/*.py'
- '.github/workflows/mypy.yaml'
- 'tools/mypy.sh'
- 'pyproject.toml'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '**/*.py'
- '.github/workflows/mypy.yaml'
- 'tools/mypy.sh'
- 'pyproject.toml'
jobs: jobs:
mypy: mypy:

View File

@ -6,16 +6,28 @@ on:
push: push:
branches: branches:
- main - main
paths:
- "**/*.py"
- pyproject.toml
- requirements-lint.txt
- .github/workflows/matchers/ruff.json
- .github/workflows/ruff.yml
pull_request: pull_request:
branches: branches:
- main - main
paths:
- "**/*.py"
- pyproject.toml
- requirements-lint.txt
- .github/workflows/matchers/ruff.json
- .github/workflows/ruff.yml
jobs: jobs:
ruff: ruff:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] python-version: ["3.12"]
steps: steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
@ -30,9 +42,6 @@ jobs:
run: | run: |
echo "::add-matcher::.github/workflows/matchers/ruff.json" echo "::add-matcher::.github/workflows/matchers/ruff.json"
ruff check --output-format github . ruff check --output-format github .
- name: Spelling check with codespell
run: |
codespell --toml pyproject.toml
- name: Run isort - name: Run isort
run: | run: |
isort . --check-only isort . --check-only

View File

@ -6,15 +6,22 @@ on:
push: push:
branches: branches:
- main - main
paths:
- "**/*.py"
- .github/workflows/yapf.yml
pull_request: pull_request:
branches: branches:
- main - main
paths:
- "**/*.py"
- .github/workflows/yapf.yml
jobs: jobs:
yapf: yapf:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] python-version: ["3.12"]
steps: steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}