Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Migrate unit and integration tests from TravisCI to GitHub Actions #580
Migrate unit and integration tests from TravisCI to GitHub Actions #580
Changes from 4 commits
85fade9
3015f76
0038615
a5b2609
2426af3
33592a5
0daf7ae
88bc5d9
39006bd
417238f
a950c87
7bb6cb5
3115443
0b82f05
4183ece
5a606bc
4e59c92
403643b
8ee626a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given these are slightly "expensive" tests since they download files (and running them for every commit could ultimately influence the icepyx metrics), what are our options for restricting how often they run for a given PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These triggers (
branches:
) would be for every merge, not for every commit on PRs. We can customize thepull_request:
triggers. By default, they run onopen
andsynchronize
(effectively, when the PR is pushed to, not on every commit). The full list is here: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_requestI think the best way we can limit these runs is by adding
paths:
filters. That would enable e.g. docs changes to not trigger the expensive tests!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider this part of this PR, or create an issue to track the work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right - forgot this subtlety - but a PR can have a lot of pushes too!
I would definitely consider it part of this PR. I don't want to have a setup running that will trigger so many runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to push back too hard, because I am fine doing it however, but I do want to raise that Travis CI behaves this way already:
https://github.com/icesat2py/icepyx/blob/development/.travis.yml#L21-L24
I would lean towards breaking this work into two PRs: (1) migrate Travis -> GH; (2) more efficient. When those PRs are merged into
development
, they will produce two clearer commits and entries in the changelog. I'm OK with immediately following this PR up with step 2 if you're OK with dividing it!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no approved event type. That workflow checks the current state of the PR after triggering the workflow, and if it's not "approved", it sets the workflow to "skipped":
icepyx/.github/workflows/uml_action.yml
Line 10 in a52bc37
If there was an approved event type, then we could avoid the triggering in the first place :(
Since we have other possible triggers we would need something like
${{ github.event.action != "pull_request_review" || github.event.review.state == "approved" }}
. Otherwise, integration tests would be skipped on our release PRs until they were approved, and if we want that behavior we can remove thepull_request
trigger. Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess that was wishful thinking on my part then.
I'm happy with the latest edits versus this. I don't think we tend to have a lot of official "reviews" until we're getting pretty close to merging, and it would be great to have the tests run on release PRs right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might need to rescind this. I'm noticing the integration test is running, which makes me think that GH considers a comment (regardless of approval) to be a "review", thus triggering the action for any comment made on the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking the least unpalatable option at this point is your suggestion to remove the PR trigger and add something like
${{ github.event.action != "pull_request_review" || github.event.review.state == "approved" }}
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it on for size!
This file was deleted.