forked from open-telemetry/opentelemetry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.2 KB
/
build-pull-request.yml
File metadata and controls
83 lines (73 loc) · 2.2 KB
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
79
80
81
82
83
name: Build pull request
on:
pull_request:
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: Set up Java 8 for tests
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8
java-package: jre
- id: setup-java-11
name: Set up Java 11 for tests
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- id: setup-java-17
name: Set up Java 17
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
arguments: |
build
${{ 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/codecov-action@v3
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 blocking pull requests if external links break
markdown-link-check:
uses: ./.github/workflows/reusable-markdown-link-check.yml
# this is not a required check to avoid blocking pull requests if new misspellings are added
# to the misspell dictionary
misspell-check:
uses: ./.github/workflows/reusable-misspell-check.yml
required-status-check:
needs:
- build
runs-on: ubuntu-latest
if: always()
steps:
- if: needs.build.result != 'success'
run: exit 1