-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (43 loc) · 1.2 KB
/
0.x.x_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
43
44
45
46
47
48
49
50
51
name: 0.x.x Build
on:
push:
branches: [ '0.[0-9]+.x' ]
pull_request:
branches: [ '0.[0-9]+.x' ]
workflow_dispatch:
inputs:
commit_id:
description: 'Git commit id'
required: true
jobs:
build:
name: Gradle build on JDK ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ '8', '11', '17', '21' ]
steps:
- name: Setup Commit ID
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "COMMIT_ID=${{ github.event.inputs.commit_id }}" >> ${GITHUB_ENV}
else
echo "COMMIT_ID=${{ github.sha }}" >> ${GITHUB_ENV}
fi
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT_ID }}
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: 'gradle'
- name: Run check
run: ./gradlew clean build
- name: Check coverage
run: ./gradlew koverMergedVerify
- name: Merge coverage reports
run: ./gradlew koverMergedReport