Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Run CI GitHub Action On Changes To Pull Request #412

Closed
TimothyWillard opened this issue Dec 4, 2024 · 1 comment · Fixed by #426
Closed

[Bug]: Run CI GitHub Action On Changes To Pull Request #412

TimothyWillard opened this issue Dec 4, 2024 · 1 comment · Fixed by #426
Labels
bug Defects or errors in the code. gempyor Concerns the Python core. high priority High priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc.

Comments

@TimothyWillard
Copy link
Contributor

Label

bug, gempyor, meta/workflow

Priority Label

high priority

Describe the bug/issue

The unit tests for gempyor will pull files from the examples/tutorials/ folder by the gempyor CI GitHub action which can cause configs that break CI to be introduced silently. See 7d10aa1.

To Reproduce

  1. Modify files in the examples/tutorials/ directory.
  2. Open a PR with those changes.
  3. Note that the gempyor CI action does not run.

Environment, if relevant

Not relevant

@TimothyWillard TimothyWillard added bug Defects or errors in the code. gempyor Concerns the Python core. high priority High priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc. labels Dec 4, 2024
@TimothyWillard
Copy link
Contributor Author

TimothyWillard commented Dec 5, 2024

This is a misunderstanding on my part, the gempyor CI action does run on changes to the examples:

on:
workflow_dispatch:
push:
paths:
- examples/**/*
- flepimop/gempyor_pkg/**/*
branches:
- main
pull_request:
paths:
- examples/**/*
- flepimop/gempyor_pkg/**/*
branches:
- main

The issue in GH-407 was the PR was originally targeted for main and the changes didn't affect the unit tests in main so the action ran fine on f7d19eb. Then the PR target was changed to dev which included tests that were affected and the action was not ran again because no commits were added. We would have caught this if the PR was targeted for dev from the beginning or if any commits were added after changing the target. I think the solution is to add explicit types to the pull_request trigger of ["edited", "opened", "synchronize", "reopened"]. See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request for details.

@TimothyWillard TimothyWillard changed the title [Bug]: Run gempyor CI GitHub Action On Changes To examples/tutorials/ Files [Bug]: Run CI GitHub Action On Changes To Pull Request Dec 5, 2024
@TimothyWillard TimothyWillard added this to the Software Quality milestone Dec 6, 2024
@TimothyWillard TimothyWillard linked a pull request Dec 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects or errors in the code. gempyor Concerns the Python core. high priority High priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant