-
Notifications
You must be signed in to change notification settings - Fork 29
107 lines (101 loc) · 3.86 KB
/
maven.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: 'master'
pull_request:
branches: '**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
cache: maven
distribution: temurin
- name: Build with Maven
run: mvn -B -DskipTests clean package --file pom.xml --fail-at-end
- name: Run codacy-coverage-reporter
if: ${{ github.repository_owner == 'OpenTOSCA' }}
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: org.opentosca.container.reporting/target/site/jacoco-aggregate/jacoco.xml
tests:
strategy:
matrix:
test:
- AdaptMultiMyTinyToDoIntegrationTest
- ApacheWebAppIntegrationTest
- ConnectToIntegrationTest
- MigrateMyTinyToDo2MultiMyTinyToDoIntegrationTest
- MultiMyTinyToDoIntegrationTest
- MyTinyToDoBPMNIntegrationTest
- MyTinyToDoIntegrationTest
#- MyTinyToDoSqlIntegrationTest
#- PlanQKServiceIntegrationTest
- QHAnaTest
runs-on: ubuntu-latest
timeout-minutes: 80
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
cache: maven
distribution: temurin
- name: Check out TOSCA internal repository
uses: actions/checkout@v3
with:
repository: OpenTOSCA/tosca-definitions-test-applications
ref: 'main'
path: 'tosca-definitions-test-applications'
lfs: 'true'
- name: Copy TOSCA internal repository to tmp
run: cp -R $GITHUB_WORKSPACE/tosca-definitions-test-applications /tmp/
- name: Show TOSCA internal repository content
run: ls -a /tmp/tosca-definitions-test-applications
- name: Setup Docker Remote API
run: sudo sed -ie "s@ExecStart=\/usr\/bin\/dockerd -H fd:\/\/@ExecStart=\/usr\/bin\/dockerd -H fd:\/\/ -H tcp:\/\/0.0.0.0:2375 -H unix:///var/run/docker.sock@g" /lib/systemd/system/docker.service
- name: Reload Daemons
run: sudo systemctl daemon-reload
- name: Restart Docker
run: sudo service docker restart
- name: Configure runtime with test properties
run: cp test.properties ./org.opentosca.container.core/src/main/resources/application.properties
- name: Show application properties
run: cat ./org.opentosca.container.core/src/main/resources/application.properties
- name: Test Docker Remote API
run: curl -X GET http://localhost:2375/images/json
- name: Start test environment
run: docker-compose -f test.yml up -d
- name: Save engine-ia-java17 log to file
run: docker-compose -f test.yml logs -f engine-ia-java17 > engine-ia-java17.log &
- name: Save engine-ia-java8 log to file
run: docker-compose -f test.yml logs -f engine-ia-java8 > engine-ia-java8.log &
- name: Sleep for 120 seconds
uses: whatnick/wait-action@master
with:
time: '120s'
- name: Test with Maven
timeout-minutes: 60
run: mvn -B -DfailIfNoTests=false -Dtest=org.opentosca.container.war.tests.${{ matrix.test }} test --file pom.xml --fail-at-end
env:
PlanqkApiKey: ${{ secrets.PLANQK_API_KEY }}
OrganizationID: "eecfa1d7-5f52-45d4-accc-b470ad05959f"
- name: Store engine-ia log
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: engine-ia-log
path: |
engine-ia-java17.log
engine-ia-java8.log