-
-
Notifications
You must be signed in to change notification settings - Fork 420
72 lines (60 loc) · 1.73 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
name: Java CI with Gradle
on:
push:
paths:
- '**.java'
- '**.json'
- 'gradle**'
- 'build.gradle'
pull_request:
paths:
- '**.java'
- '**.json'
- 'gradle**'
- 'build.gradle'
# Makes it possible to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'microsoft'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
- name: Generate and submit dependency graph
if: ${{ github.event_name == 'push' }}
uses: gradle/actions/dependency-submission@v4
- name: Run tests and build
run: ./gradlew build --stacktrace --warning-mode=fail
- name: VirusTotal scan
if: ${{ github.event_name == 'push' }}
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
files: |
./build/libs/*.jar
continue-on-error: true
- name: Run the mod and take screenshots
uses: modmuss50/xvfb-action@v1
with:
run: ./gradlew runEndToEndTest --stacktrace --warning-mode=fail
- name: Upload test screenshots
uses: actions/upload-artifact@v4
if: always()
with:
name: Test Screenshots
path: run/screenshots