-
-
Notifications
You must be signed in to change notification settings - Fork 191
46 lines (38 loc) · 1.25 KB
/
gradle.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
# GitHub Actions workflow to automatically build and test Reposilite.
name: "Reposilite CI"
on:
push:
branches: [ "main", "3.0" ]
pull_request:
branches: [ "main", "3.0" ]
jobs:
build:
name: "Build with JDK ${{ matrix.java-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
# Use 11 LTS releases and the latest one
java-version: [ 11, 21 ]
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Fetch git tags" # Required for axion-release-plugin
run: git fetch --tags --unshallow
- name: "Validate gradle wrapper"
uses: gradle/wrapper-validation-action@v1
- name: "Set up Java ${{ matrix.java-version }}"
uses: actions/setup-java@v3
with:
java-version: "${{ matrix.java-version }}"
distribution: "liberica"
- name: "Grant execute permission for gradlew"
run: chmod +x gradlew
- name: "Gradle build"
uses: gradle/gradle-build-action@v2
with:
arguments: ":reposilite-backend:testCoverage"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
files: "./reposilite-backend/build/reports/jacoco/reposilite-backend-report.xml"
fail_ci_if_error: false