-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (47 loc) · 1.18 KB
/
pr-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
name: "PR Build"
on:
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
test-java-version:
- 8
- 11
- 17
- 21
protobuf-version:
- '' # Use from source code
include:
- os: ubuntu-latest
test-java-version: 21
protobuf-version: 3.18.0
- os: ubuntu-latest
test-java-version: 21
coverage: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Run Tests
run: |
./gradlew build ${{ matrix.coverage && 'jacocoTestReport' || '' }} -PtestJavaVersion=${{ matrix.test-java-version }}
env:
PROTOBUF_VERSION: ${{ matrix.protobuf-version }}
- uses: codecov/codecov-action@v2.1.0
if: ${{ matrix.coverage }}