From 083a3334bbb54c6a39b17ae48cd24fd3565bd3f3 Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:44:51 -0800 Subject: [PATCH] Configure GHA to run tests when example changesheets change --- .github/workflows/python-app.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 483c664a..f743e8c1 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -3,6 +3,15 @@ name: Python application +# Note: The following events will trigger this workflow: +# 1. Someone pushes a commit to `main` that includes changes to any of the listed files. +# 2. Someone opens a pull request that includes changes to any of the listed files. +# 3. Someone clicks the "Run workflow" button on the "Actions" tab on GitHub. +# +# References: +# - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#example-including-paths +# - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet +# on: push: branches: [ main ] @@ -11,7 +20,9 @@ on: - 'Makefile' - '**.Dockerfile' - '**.py' - - 'requirements/main.txt' + - 'requirements/main.txt' + # Every file in the `data` directory or in any of its subdirectories: + - 'metadata-translation/notebooks/data/**' pull_request: paths: - '.github/workflows/python-app.yml' @@ -19,6 +30,7 @@ on: - '**.Dockerfile' - '**.py' - 'requirements/main.txt' + - 'metadata-translation/notebooks/data/**' # Allow developers to trigger this workflow manually via the "Actions" page on GitHub. # Reference: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow workflow_dispatch: { }