mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-09-22 13:01:12 +03:00
33 lines
869 B
YAML
33 lines
869 B
YAML
name: Pull Request Tests
|
|
|
|
on: [pull_request, workflow_dispatch]
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
testPR:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 17
|
|
- name: Fetch latest Arc
|
|
run: git clone --depth=1 --branch=v9 https://github.com/Anuken/Arc ../Arc
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v6
|
|
- name: Run unit tests
|
|
run: ./gradlew tests:test --stacktrace --rerun
|
|
- name: Run unit tests and build JAR
|
|
run: ./gradlew desktop:dist
|
|
- name: Upload desktop JAR for testing
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Desktop JAR
|
|
archive: false
|
|
path: desktop/build/libs/Mindustry.jar
|