-
Notifications
You must be signed in to change notification settings - Fork 160
/
action.yaml
52 lines (52 loc) · 2.03 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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@v4
with:
distribution: 'zulu'
java-version: 11
- name: Setup Node
uses: actions/setup-node@v4 # Installs Node and NPM
with:
node-version: 16
- name: Install Swagger CLI # Installs Swagger CLI to bundle OpenAPI files
run: 'npm install -g @apidevtools/swagger-cli'
shell: bash
- uses: actions/cache@v4 # Cache local Maven repository to reuse dependencies
with:
path: ~/.m2/repository
key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache
- name: Cache Maven repository
uses: actions/cache@v4
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: 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 upload
uses: codecov/codecov-action@v4