-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
56 lines (52 loc) · 1.84 KB
/
gradle-test.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
53
54
55
56
name: Gradle tests (Java samples)
on:
push:
paths:
- 'samples/client/petstore/java/**'
- 'samples/openapi3/client/petstore/java/**'
pull_request:
paths:
- 'samples/client/petstore/java/**'
- 'samples/openapi3/client/petstore/java/**'
env:
GRADLE_VERSION: 8.7
jobs:
build:
name: Gradle tests
runs-on: ubuntu-latest
container: gradle:jdk11
strategy:
fail-fast: true
matrix:
sample:
- samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
- samples/openapi3/client/petstore/java/jersey2-java8
- samples/client/petstore/java/jersey2-java8-localdatetime
- samples/client/petstore/java/jersey2-java8
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/webclient-swagger2
- samples/client/petstore/java/native
- samples/client/petstore/java/native-jakarta
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
# Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
# Cache Gradle Wrapper
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: /bin/sh gradlew build -x test