-
-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (40 loc) · 1.01 KB
/
build.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
name: build
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# LTS versions + latest
java: [ '17', '20' ]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: |
./gradlew --no-daemon -s build
- name: Upload coverage to Codecov
uses: codecov/[email protected]
if: ${{ matrix.java == '17' }}
- name: Save reports
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: reports-${{ matrix.java }}
path: build/reports/