-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.01 KB
/
build-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
name: Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Set the fetch-depth > 1 or set to 0 for codecov upload detection
fetch-depth: 2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
cache: "gradle"
- name: Build with Gradle
run: ./gradlew build --no-daemon
- name: Run tests
run: ./gradlew test --no-daemon
- name: Lint with Gradle
run: ./gradlew lint --no-daemon
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}