-
Notifications
You must be signed in to change notification settings - Fork 160
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
FIX - Ci improvement - maven artifact caching and various tweaks #3785
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5220621
inserted action definition for each test suite
0878ef5
Used action for test suite
ba157e5
Execution of tests suite only under test projects (ci speed-up)
b675b6f
small fix with tag defined with the logical or
9380d33
changed some need-docker-images values in some jobs
19b7549
mods to maven caching to use different cache in each workflow run
899d3e1
fine tuning maven artifacts cache
68fd57c
removed test suites without respective tests in code base
0dbdc11
removed full-build for jobs that need docker images
96a6791
removed comments from removed tests
e227c29
Added time-out using default parameters & removing retry gitAction
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: 'Execute tests tagged in a certain way' | ||
description: 'Execute tests suite for tests tagged as specified' | ||
inputs: | ||
tag: | ||
description: Cucumber tag of the tests to run | ||
required: true | ||
needs-docker-images: | ||
description: true if this suite needs docker images, false otherwise | ||
required: false | ||
default: 'true' | ||
#outputs: | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 11 | ||
- name: Cache Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache | ||
- name: Docker images creation | ||
if: ${{ inputs.needs-docker-images == 'true' }} | ||
run: mvn clean install -pl ${APP_PROJECTS} && mvn clean install -Pdocker --f assembly/pom.xml | ||
shell: bash | ||
- name: Dns look-up containers needed for tests - message-broker | ||
if: ${{ inputs.needs-docker-images == 'true' }} | ||
run: echo "127.0.0.1 message-broker" | sudo tee -a /etc/hosts | ||
shell: bash | ||
- name: Dns look-up containers needed for tests - job-engine | ||
if: ${{ inputs.needs-docker-images == 'true' }} | ||
run: echo "127.0.0.1 job-engine" | sudo tee -a /etc/hosts | ||
shell: bash | ||
- name: Test execution step | ||
uses: nick-fields/[email protected] | ||
with: | ||
timeout_minutes: 45 | ||
retry_on: error | ||
max_attempts: 1 | ||
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.filter.tags="${{ inputs.tag }}" -pl ${TEST_PROJECTS} verify | ||
- name: Code-coverage results | ||
run: bash <(curl -s https://codecov.io/bash) | ||
shell: bash |
Oops, something went wrong.
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.
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 this be removed completely? Having a retry plugin with attempts=1 just adds confusion
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 maintained it thinking that the timeout mechanism of 45 mins could be useful for some reason. I would wait what Riccardo has to say to this regard
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.
If there is no ather way (or action) to handle the timeout of a single job I prefer to keep the retry action.
Did you check the job 'timeout-minutes' parameter: timeout-parameter
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 introduced the job timeout parameter, substituting the retry GitAction. Learning the provided doc. I understood that this has an equivalent result