-
Notifications
You must be signed in to change notification settings - Fork 165
56 lines (49 loc) · 1.29 KB
/
gradle.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
name: Gradle Build
on:
push:
branches:
- master
pull_request:
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
java: ['8', '11']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'gradle'
- name: Build Library
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
command: |
./gradlew build
- name: Publish to Maven Local
run: ./gradlew publishToMavenLocal
- name: Build Examples
if: matrix.java == '11'
run: ./gradlew build
working-directory: ./examples
- id: test-data
name: Run HelloWorld
if: matrix.java == '11'
working-directory: ./examples
run: |-
./gradlew :server:HelloWorldServer &
sleep 30
OUTPUT=$(./gradlew :client:HelloWorldClient)
echo "stdout=${OUTPUT//$'\n'/'%0A'}" >> $GITHUB_OUTPUT
- name: Test HelloWorld
if: matrix.java == '11'
uses: nick-invision/assert-action@v1
with:
expected: "Received: Hello world"
actual: ${{ steps.test-data.outputs.stdout }}
comparison: contains