-
Notifications
You must be signed in to change notification settings - Fork 23
124 lines (119 loc) · 3.42 KB
/
microshed-ci.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: MicroShed CI
on:
pull_request:
branches:
- master
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- '.github/ISSUE_TEMPLATE/**'
env:
LANG: en_US.UTF-8
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: joschi/setup-jdk@v2
with:
java-version: 11
openjdk_impl: openj9
- name: Apply repository caches
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-2
!~/.gradle/caches/modules-2/org.microshed*
~/.gradle/wrapper
~/.m2/repository/
!~/.m2/repository/org/microshed/
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew assemble testClasses
integration_tests:
name: Tests - ${{matrix.category}}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
max-parallel: 18
matrix:
include:
- category: JAXRS
projects: >
jaxrs-json
jaxrs-basicauth
jaxrs-mpjwt
everything-app
- category: GENERAL
projects: >
maven-app
everything-app
jdbc-app
kafka-app
- category: LIBERTY/PAYARA
projects: >
liberty-app
payara-app
- category: QUARKUS/WILDFLY
projects: >
quarkus-app
wildfly-app
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: joschi/setup-jdk@v2
with:
java-version: 11
openjdk_impl: openj9
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{ github.repository_owner }}
- name: Apply repository caches
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-2
!~/.gradle/caches/modules-2/org.microshed*
~/.gradle/wrapper
~/.m2/repository/
!~/.m2/repository/org/microshed/
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run integration tests
shell: bash
env:
TEST_PROJECTS: ${{matrix.projects}}
CATEGORY: ${{matrix.category}}
run: |
chmod +x gradlew
echo "org.gradle.daemon=false" >> gradle.properties
echo "Will be running projects $TEST_PROJECTS"
for TEST_PROJECT in $TEST_PROJECTS
do
if [[ ! -d "sample-apps/$TEST_PROJECT" ]]; then
echo "::error::Test project $TEST_PROJECT does not exist.";
exit 1;
fi
done
for TEST_PROJECT in $TEST_PROJECTS
do
echo "### BEGIN running test project $TEST_PROJECT"
./gradlew :microshed-testing-$TEST_PROJECT:test
echo "### END running test project $TEST_PROJECT";
done
echo "Done running all tests."
- name: Upload test results
if: always()
run: |
testspace [${{matrix.category}}]sample-apps/*/build/test-results/**/*.xml