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

Update github actions configuration #703

Closed

Conversation

bmscomp
Copy link
Contributor

@bmscomp bmscomp commented Nov 25, 2023

This pull request aims to update Github actions configuration, to give the possibility to contributors to check if their contribution on project builds the ci/cd with success, and add step for building using JDK 21 version

  • update actions steps's tools
  • add entry for building project with jdk 21
  • add the ability to build project on pull request stage

 - update actions steps's tools
 - add entry for building project with jdk 21
 - add the ability to build project on pull request stage

fix build issue on matrix
@@ -1,8 +1,29 @@
name: Jakarta Contexts and Dependency Injection CI

on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea here is that all changes go in via PRs so this will only really trigger during a release (since the bot does direct push) and that's kind of pointless. At least from my perspective, your mileage may vary :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I activated triggering the ci on a push on a custom branch for a given push of one or many commits, thing that changes from the previous configuration is that now I can see the build status on my own branch before merging it, this will someway prevent me to make a pull request with changes that can break the build or the tests

image

@@ -1,8 +1,29 @@
name: Jakarta Contexts and Dependency Injection CI

on:
push:
branches-ignore:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keep below listed combinations in place?
That combination doesn't even match anything in this project, or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to trigger the build on a pull request, to be sure the build is going well, and no test is failed. And for some branches we can skip running the ci, if we make a wip/ branche the build will not be triggered, this is a way is to prevent builds on all branches and to save cpu and memory for Github Actions

pull_request:
branches: [ master ]
types: [opened, synchronize, reopened, ready_for_review]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want CI to trigger for any PR - main branch would be sufficient.
In case we want to push to older version, that will have to have its own CI setup, mainly due to different JDK versions it is supposed to support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main purpose of triggering the CI on a push or pull request is to be sure that every thing is building well before making a pull request, means the building matrix is fine and the tests succeeds, this will give time to contributor to fix things before making a pull request and have an idea about the ci execution result even on a custom branch.

For the merge request on main branch, the CI always needs approval from maintainers

@manovotn
Copy link
Contributor

I've sent an alternative PR for this - #706
IMO we just want to update those bits as the traffic and workflow in the project isn't that complex. We can always revisit.

@Ladicek
Copy link
Contributor

Ladicek commented Nov 28, 2023

Agree. I'll close this PR, but thanks a lot for submitting it!

@Ladicek Ladicek closed this Nov 28, 2023
@bmscomp
Copy link
Contributor Author

bmscomp commented Nov 28, 2023

@starksm64 @manovotn @Ladicek, I think it's better to give a change to a new contributor to fix his pull request to fit review remarks rather pick just good part of it and merge it, then drop the original pull request

Anyway this is my point of view

@manovotn
Copy link
Contributor

Well, I would advocate for the changes I sent and I wanted to have main tested for further changes that we're now pouring in - currently, due to branch change from master to main, the CI didn't run at all. Hence my choice. Otherwise we did just what you say with your other two PRs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants