Mindustry/.github/workflows/pr.yml
Alex a68c17d876
GitHub Workflows security hardening (#7629)
* build: harden push.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden deployment.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden pr.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-27 08:10:18 -04:00

27 lines
638 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@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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