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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
@@ -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

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

- 'wip/**'
- 'draft/**'
paths-ignore:
- '.gitignore'
- 'CONTRIBUTING.adoc'
- 'NOTICE.md'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
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

paths-ignore:
- '.gitignore'
- 'CONTRIBUTING.adoc'
- 'NOTICE.md'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
workflow_dispatch:

jobs:
build:
Expand All @@ -11,12 +32,13 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '11', '17' ]
java: [ '11', '17', '21' ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1.4.3
uses: actions/setup-java@v3.13.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: "Maven install"
run: |
Expand Down