forked from neoforged/NeoGradle
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.04 KB
/
pr.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
name: 'Build Pull Request'
run-name: Build for PR ${{ github.event.pull_request.number }}
on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build
run: ./gradlew --info -s -x check build
- name: Test
run: ./gradlew --info -s check
# Always upload test results
- name: Merge Test Reports
if: success() || failure()
run: npx junit-report-merger junit.xml "**/TEST-*.xml"
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: junit.xml