diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 8d910850c85..ae900ac31d5 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -11,13 +11,9 @@ on: branches: [ main ] paths: - 'pygmt/**/*.py' - - '!pygmt/tests/**' - - '.github/workflows/benchmarks.yml' - pull_request: - paths: - - 'pygmt/**/*.py' - - '!pygmt/tests/**' - '.github/workflows/benchmarks.yml' + # Uncomment the 'pull_request' line below to trigger the workflow in PR + # pull_request: # `workflow_dispatch` allows CodSpeed to trigger backtest # performance analysis in order to generate initial data. workflow_dispatch: diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 3a4a43852c3..2b343085382 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -5,14 +5,14 @@ # by other GitHub Actions workflows. # # It is scheduled to run every Sunday at 12:00 (UTC). If new remote files are -# needed urgently, maintainers can update the workflow file or +# needed urgently, maintainers can update the workflow file or the # 'pygmt/helpers/caching.py' file to refresh the cache. # name: Cache data on: pull_request: - # Make any changes to the following files to refresh the cache + # Make any changes to the following files to refresh the cache in PRs paths: - 'pygmt/helpers/caching.py' - '.github/workflows/cache_data.yaml' diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 1a5313d5f47..25e944986eb 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -18,13 +18,22 @@ name: Docs on: push: branches: [ main ] + paths: + - 'pygmt/**/*.py' + - '!pygmt/tests/**' + - 'doc/**' + - 'examples/**' + - 'README.rst' + - '.github/workflows/ci_docs.yml' pull_request: types: [opened, reopened, synchronize, ready_for_review] - paths-ignore: - - 'pygmt/tests/**' - - '*.md' - - 'LICENSE.txt' - - '.gitignore' + paths: + - 'pygmt/**/*.py' + - '!pygmt/tests/**' + - 'doc/**' + - 'examples/**' + - 'README.rst' + - '.github/workflows/ci_docs.yml' release: types: - published diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index f68d4d355b3..f6cb2821f48 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -25,15 +25,14 @@ name: Tests on: push: branches: [ main ] + paths: + - 'pygmt/**' + - '.github/workflows/ci_tests.yaml' pull_request: types: [opened, reopened, synchronize, ready_for_review] - paths-ignore: - - 'doc/**' - - 'examples/**' - - '*.md' - - 'README.rst' - - 'LICENSE.txt' - - '.gitignore' + paths: + - 'pygmt/**' + - '.github/workflows/ci_tests.yaml' release: types: - published diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index b518eb90acd..22e9911a6b4 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -17,13 +17,9 @@ on: # branches: [ main ] pull_request: types: [ready_for_review] - paths-ignore: - - 'doc/**' - - 'examples/**' - - '*.md' - - 'README.rst' - - 'LICENSE.txt' - - '.gitignore' + paths: + - 'pygmt/**' + - '.github/workflows/ci_tests_dev.yaml' repository_dispatch: types: [test-gmt-dev-command] # Schedule tests on Monday/Wednesday/Friday diff --git a/.github/workflows/ci_tests_legacy.yaml b/.github/workflows/ci_tests_legacy.yaml index 6bfea2fa21c..f36355dba65 100644 --- a/.github/workflows/ci_tests_legacy.yaml +++ b/.github/workflows/ci_tests_legacy.yaml @@ -11,15 +11,12 @@ name: GMT Legacy Tests on: # push: # branches: [ main ] + # Uncomment the 'pull_request' line below to trigger the workflow in PR # pull_request: # types: [ready_for_review] - # paths-ignore: - # - 'doc/**' - # - 'examples/**' - # - '*.md' - # - 'README.rst' - # - 'LICENSE.txt' - # - '.gitignore' + # paths: + # - 'pygmt/**' + # - '.github/workflows/ci_tests_legacy.yaml' # Schedule tests on Tuesday schedule: - cron: '0 0 * * 2' diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index fbd69fe1e32..6b1a52661ea 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -17,8 +17,15 @@ name: Publish to PyPI # Only run for pushes to the main branch and releases. on: push: - branches: - - main + branches: [ main ] + paths: + - 'pygmt/**' + - '!pygmt/tests/**' + - 'Makefile' + - 'MANIFEST.in' + - 'pyproject.toml' + - 'README.rst' + - '.github/workflows/publish-to-pypi.yml' release: types: - published diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 58efce03d7a..3a83758c4ba 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -8,7 +8,6 @@ name: Release Drafter on: push: - # branches to consider in the event; optional, defaults to all branches: - main diff --git a/.github/workflows/type_checks.yml b/.github/workflows/type_checks.yml index 25c5ff42d87..7ecefe04277 100644 --- a/.github/workflows/type_checks.yml +++ b/.github/workflows/type_checks.yml @@ -10,7 +10,13 @@ name: Static Type Checks on: push: branches: [ main ] + paths: + - 'pygmt/**/*.py' + - '.github/workflows/type_checks.yml' pull_request: + paths: + - 'pygmt/**/*.py' + - '.github/workflows/type_checks.yml' # Schedule daily tests schedule: - cron: '0 0 * * *'