2020-11-20 06:53:02 +07:00
|
|
|
name: Pull Request Tests
|
|
|
|
|
2021-04-06 22:50:49 +07:00
|
|
|
on: [pull_request, workflow_dispatch]
|
2020-11-20 06:53:02 +07:00
|
|
|
|
2022-09-27 19:10:18 +07:00
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2020-11-20 06:53:02 +07:00
|
|
|
jobs:
|
2021-06-14 22:05:37 +07:00
|
|
|
testPR:
|
2020-11-20 06:53:02 +07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-11-20 07:27:21 +07:00
|
|
|
- uses: actions/checkout@v2
|
2022-03-28 22:33:15 +07:00
|
|
|
- name: Set up JDK 17
|
2020-11-20 06:53:02 +07:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2022-03-28 22:33:15 +07:00
|
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
2020-11-20 06:53:02 +07:00
|
|
|
- name: Run unit tests and build JAR
|
|
|
|
run: ./gradlew test desktop:dist
|
|
|
|
- name: Upload desktop JAR for testing
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Desktop JAR (zipped)
|
|
|
|
path: desktop/build/libs/Mindustry.jar
|