Mindustry/.github/workflows/pr.yml

29 lines
713 B
YAML
Raw Normal View History

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
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
2024-01-27 07:07:32 +07:00
- name: Run unit tests
2024-02-20 22:11:24 +07:00
run: ./gradlew tests:test --stacktrace --rerun
2020-11-20 06:53:02 +07:00
- name: Run unit tests and build JAR
2024-01-27 07:07:32 +07:00
run: ./gradlew desktop:dist
2020-11-20 06:53:02 +07:00
- name: Upload desktop JAR for testing
2024-09-14 04:58:11 +07:00
uses: actions/upload-artifact@v4
2020-11-20 06:53:02 +07:00
with:
name: Desktop JAR (zipped)
path: desktop/build/libs/Mindustry.jar