-
Notifications
You must be signed in to change notification settings - Fork 295
79 lines (79 loc) · 2.62 KB
/
continuous-integration.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
79
name: Continuous integration
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "JDK ${{ matrix.java }} on ${{ matrix.os }} with Error Prone ${{ matrix.epVersion }}"
strategy:
matrix:
include:
- os: ubuntu-latest
java: 11
epVersion: 2.14.0
- os: ubuntu-latest
java: 17
epVersion: 2.14.0
- os: macos-latest
java: 11
epVersion: 2.27.1
- os: ubuntu-latest
java: 11
epVersion: 2.27.1
- os: windows-latest
java: 11
epVersion: 2.27.1
- os: ubuntu-latest
java: 17
epVersion: 2.27.1
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out NullAway sources
uses: actions/checkout@v4
- name: 'Set up JDKs'
uses: actions/setup-java@v4
with:
java-version: |
21
17
${{ matrix.java }}
distribution: 'temurin'
- name: Validate Gradle wrappers
uses: gradle/actions/wrapper-validation@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build and test using Java ${{ matrix.java }} and Error Prone ${{ matrix.epVersion }}
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
run: ./gradlew build
- name: Run shellcheck
run: ./gradlew shellcheck
if: runner.os == 'Linux'
- name: Aggregate jacoco coverage
id: jacoco_report
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
run: ./gradlew codeCoverageReport
continue-on-error: true
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.27.1' && github.repository == 'uber/NullAway'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ./code-coverage-report/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: steps.jacoco_report.outcome == 'success'
- name: Test publishToMavenLocal flow
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
ORG_GRADLE_PROJECT_VERSION_NAME: '0.0.0.1-LOCAL'
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: 'false'
run: ./gradlew publishToMavenLocal
if: matrix.java == '11'
- name: Check that Git tree is clean after build and test
run: ./.buildscript/check_git_clean.sh