-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.35 KB
/
build-and-test.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
name: Build and Test
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
paths-ignore:
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
- 'renovate.json'
jobs:
build-and-test:
name: Build and Test
strategy:
matrix:
os: [ ubuntu-latest ]
java_version: [ 15, 17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java_version }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Azure Platform Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Build
run: ./gradlew build
- name: Lint Check
run: ./gradlew ktlintCheck
- name: Test
run: ./gradlew test
- name: Generate jacoco report
run: ./gradlew jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.java_version == 17 }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/jacoco/test/jacocoTestReport.xml
fail_ci_if_error: true
verbose: true