-
Notifications
You must be signed in to change notification settings - Fork 408
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
feat: add GH action to update dependencies #717
Conversation
uses: actions/checkout@v2 | ||
|
||
- name: Updating semver dependencies | ||
run: make update-deps |
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.
Why run these step again instead of adding the Add & Commit step to the end of the "update-dependencies-and-test" job?
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 separated the commit into a separate job because the update-dependencies-and-test
runs on the java 8 and 11. If the commit is included in the update-dependencies-and-test
job tries to commit the changes to the pom file twice.
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.
Can't we just add an if:
condition to the step? Like we do for sonarcloud scanning in twilio (https://github.com/twilio/twilio-python/blob/main/.github/workflows/test-and-deploy.yml#L43)
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.
The issue is what if 8 and 17 pass but 11 fails tests for some non-transient issue. Then 17 would commit the change (assuming the if
is for 17) but the tests would be failing for 11.
May be able to limit job concurrency so only 1 job can run at a time: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
Note that the order of the matrix would then be crucial as we'd only want to commit on the last matrix value.
The order that you define a matrix matters. The first option you define will be the first job that runs in your workflow.
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 ended up using max-parallel to force the matrix to run 1 version at a time. After a the first language version successfully passes the next language version job runs.
Jira: DI-1972