Merge branch 'MCreator:master' into master #8
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 and test | |
on: | |
push: | |
branches: | |
- master | |
- "feature/*" | |
- "dev/*" | |
pull_request: | |
branches: | |
- master | |
- "feature/*" | |
- "dev/*" | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17.0.9+9' | |
distribution: 'temurin' | |
- name: Cache Gradle Packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.mcreator/gradle/caches/ | |
~/.mcreator/gradle/wrapper/ | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build and Test Using Gradle | |
run: xvfb-run -a ./gradlew test | |
- name: Test Javadoc Generation | |
run: ./gradlew javadoc | |
- name: Publish Test Report | |
uses: Pylo/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
include_passed: true | |
detailed_summary: true | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
- name: Prepare Gradle Cache | |
run: | | |
rm -f ~/.mcreator/gradle/caches/modules-2/modules-2.lock | |
rm -fr ~/.mcreator/gradle/caches/*/plugin-resolution/ | |
rm -f ~/.mcreator/gradle/caches/minecraft/deobfedDeps/providedDummy.jar | |
rm -f ~/.mcreator/gradle/caches/minecraft/deobfedDeps/compileDummy.jar | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |