forked from jenkinsci/gradle-jpi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.2 KB
/
ci.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "temurin"
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew clean build testGradle7.4
- name: Archive Codenarc Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: codenarc-results
path: build/reports/codenarc
- name: Archive Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-results
path: build/reports/tests