This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (107 loc) · 3.14 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Java CI Pipeline
on:
push:
branches: [ "main" ]
pull_request:
permissions:
contents: read
statuses: write
checks: write
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Run prettier
uses: creyD/[email protected]
with:
prettier_plugins: prettier-plugin-java
prettier_options: '--write **/*.java --config ./.prettier.json'
build:
needs: format
continue-on-error: true
strategy:
matrix:
os: [macos-latest, windows-latest]
codecov: [false]
include:
- os: ubuntu-latest
codecov: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: desktop:dist
- name: Test
uses: gradle/[email protected]
with:
arguments: tests:test
- name: Report Test
uses: dorny/[email protected]
if: always()
with:
name: "${{ matrix.os }} Test Report"
path: tests/build/test-results/test/*.xml
reporter: java-junit
fail-on-error: true
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
if: ${{ matrix.codecov && success()}}
with:
dotnet-version: 6.x
dotnet-quality: 'ga'
- name: ReportGenerator
uses: danielpalme/[email protected]
if: ${{ matrix.codecov && success()}}
with:
reports: tests/build/jacoco.xml
targetdir: out
reporttypes: MarkdownSummaryGithub
- name: Publish Coverage Report
uses: PavanMudigonda/[email protected]
if: ${{ matrix.codecov && success()}}
with:
markdown_path: out/SummaryGithub.md
github_token: ${{ secrets.GITHUB_TOKEN }}
report_name: Coverage Report
report_title: Code Coverage Report
- name: Upload game JAR
uses: actions/[email protected]
if: ${{ matrix.codecov && success()}}
with:
name: piazza-panic
path: desktop/build/libs/desktop-1.0.jar
checkstyle:
needs: [format]
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run Checks
uses: gradle/[email protected]
with:
arguments: check
- name: Add Checkstyle Report
uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/reports/checkstyle/*.xml'