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

Add conditional CI Checks #28

Open
phenixblue opened this issue Jul 29, 2020 · 1 comment
Open

Add conditional CI Checks #28

phenixblue opened this issue Jul 29, 2020 · 1 comment
Labels
ci enhancement New feature or request gh-actions good first issue Good for newcomers help wanted Extra attention is needed

Comments

@phenixblue
Copy link
Contributor

What would you like to be added:

Need to add some conditional logic to certain CI checks to increase efficiency for some PR's.

Why is this needed:

Not all checks need to run on a given PR unless certain files change. Github Actions has filtering capabilities, but it breaks things if you enable that with a required check (https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/36938#M2735
) and then the check doesn’t trigger in a PR. Until there’s a solution from Github we may need to add the conditional logic into the CI checks themselves.

Use something like this in a helper function that lives somewhere in ./hack. This should be generic to work for any number of directly/file paths and for any CI check.

$ git --no-pager diff --name-only --ignore-blank-lines HEAD $REF -- app

Probably not an exhaustive list, but good to start collecting the specific paths we want to trigger on for each set of checks:

Python Checks

    - /app
    - /.github/workflows

e2e Checks

    - /app
    - /deploy/manifests
    - /policies
    - /hack
    - /.github/workflows

Manifests Checks

    - /deploy/manifests
    - /hack
    - /.github/workflows
@phenixblue phenixblue added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed ci labels Jul 29, 2020
@phenixblue
Copy link
Contributor Author

This may be of use: https://github.com/dorny/paths-filter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement New feature or request gh-actions good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant