Skip to content

Commit 4ea83a0

Browse files
committed
Add GitHub workflow for integration tests on multiple Java versions
1 parent fffc440 commit 4ea83a0

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Integration Tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
java-versions:
7+
description: 'JSON array of Java versions to test'
8+
required: false
9+
default: '[8, 11, 17, 21]'
10+
schedule:
11+
- cron: '0 3 * * 1-5'
12+
13+
jobs:
14+
integration-test:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 120
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
java: ${{ fromJSON(inputs.java-versions || '[8, 11, 17, 21]') }}
21+
name: Java ${{ matrix.java }} integration test
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Prepare multi-module build
25+
run: git submodule update --init --recursive
26+
# Every job gets its own Cloud Foundry on KinD, so the matrix can run in parallel.
27+
- name: Set up Cloud Foundry
28+
uses: cloudfoundry/kind-deployment/.github/actions/setup-cf@main
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Set up Java
32+
uses: actions/setup-java@v3
33+
with:
34+
distribution: liberica
35+
java-version: ${{ matrix.java }}
36+
- name: Cache Maven packages
37+
uses: actions/cache@v3
38+
with:
39+
path: ~/.m2
40+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
41+
restore-keys: ${{ runner.os }}-m2
42+
- name: Run integration tests
43+
# CC_ADMIN_PASSWORD and UAA_ADMIN_SECRET are exported by setup-cf
44+
env:
45+
TEST_APIHOST: api.cf.127-0-0-1.nip.io
46+
TEST_ADMIN_USERNAME: ccadmin
47+
TEST_ADMIN_PASSWORD: ${{ env.CC_ADMIN_PASSWORD }}
48+
TEST_ADMIN_CLIENTID: admin
49+
TEST_ADMIN_CLIENTSECRET: ${{ env.UAA_ADMIN_SECRET }}
50+
TEST_SKIPSSLVALIDATION: 'true'
51+
TEST_QUOTAS_ROUTES_RESERVEDPORTS: '50'
52+
run: ./mvnw -B -Pintegration-test test -Dgpg.skip

0 commit comments

Comments
 (0)