Skip to content

Commit

Permalink
chore: Use paths to filter triggers for test jobs in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 26, 2024
1 parent ddb922a commit a92852c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@

name: Test {{cookiecutter.mapper_id}}

on: [push]
on:
push:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
workflow_dispatch:

jobs:
pytest:
Expand All @@ -13,7 +32,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@

name: Test {{cookiecutter.tap_id}}

on: [push]
on:
push:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
workflow_dispatch:

jobs:
pytest:
Expand All @@ -13,7 +32,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@

name: Test {{cookiecutter.target_id}}

on: [push]
on:
push:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/test.yml
- {{ cookiecutter.library_name }}/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
workflow_dispatch:

jobs:
pytest:
Expand All @@ -13,7 +32,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
Expand Down

0 comments on commit a92852c

Please sign in to comment.