Changelog #2762
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Check and Publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "1.20.1" | |
tags: | |
- "!*" | |
paths: | |
- "src/main/**" | |
- "src/test/**" | |
- "gradle.properties" | |
- "build.gradle" | |
- ".github/workflows/gradle.yml" | |
pull_request: | |
branches: | |
- "1.20.1" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v3 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- run: chmod +x ./gradlew | |
- name: Enable daemon | |
run: sed -i -e 's/org.gradle.daemon=false/org.gradle.daemon=true/' gradle.properties | |
- name: Compile 1 | |
run: ./gradlew classes | |
- name: Compile 2 | |
run: ./gradlew testClasses | |
- name: Assemble | |
run: ./gradlew assemble | |
- name: Test with JUnit | |
run: ./gradlew test | |
env: | |
TEST_UTILITY_LOG_ALL_TEST: true | |
IGNORE_OTHER_MODS_IN_RUNTIME: true | |
- name: Download assets | |
run: | | |
(./gradlew downloadMCMeta downloadAssets) || \ | |
(sleep 5 && ./gradlew downloadMCMeta downloadAssets) || \ | |
(sleep 5 && ./gradlew downloadMCMeta downloadAssets) || true | |
- name: GameTest | |
run: ./gradlew runGameTestServer | |
env: | |
TEST_UTILITY_LOG_ALL_TEST: true | |
IGNORE_OTHER_MODS_IN_RUNTIME: true | |
- name: RunData | |
run: ./gradlew runData | |
env: | |
IGNORE_OTHER_MODS_IN_RUNTIME: true | |
- name: Check report | |
run: | | |
! test -d "game-test/crash-reports" | |
- name: Upload failed test report | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
build/reports/tests/* | |
game-test/crash-reports/* | |
name: Test-Report-${{ github.run_number }}-QuarryPlus |