forked from open-telemetry/opentelemetry-java
-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (69 loc) · 2.11 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "PR Build"
on:
pull_request:
branches:
- main
- v*
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-20.04
test-java-version:
- 8
- 11
- 17
include:
- os: ubuntu-20.04
test-java-version: 17
coverage: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: setup-java-8
name: Setup Java 8 for tests
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8
java-package: jre
- id: setup-java-11
name: Setup Java 11 for tests
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- id: setup-java-17
name: Setup Java 17
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
arguments: |
build
--stacktrace
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-16.outputs.path }},${{ steps.setup-java-17.outputs.path }}
- uses: codecov/[email protected]
if: ${{ matrix.coverage }}
- uses: actions/upload-artifact@v2
if: ${{ matrix.coverage }}
with:
name: coverage-report
path: all/build/reports/jacoco/test/html
# this is not a required check to avoid unnecessary blocking of PRs if external links break
markdown-link-check:
uses: ./.github/workflows/reusable-markdown-link-check.yml
# this is not a required check to avoid unnecessary blocking of PRs if new misspellings are
# added to the misspell dictionary
markdown-misspell-check:
uses: ./.github/workflows/reusable-misspell-check.yml