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

FIX - Ci improvement - maven artifact caching and various tweaks #3785

Merged
merged 11 commits into from
Jun 7, 2023
42 changes: 42 additions & 0 deletions .github/actions/runTestsTaggedAs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
run: ./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
shell: bash
- name: Code-coverage results
run: bash <(curl -s https://codecov.io/bash)
shell: bash
Loading