Create test framework #1
Workflow file for this run
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: Gradle build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
subproject: | |
- 1.17.1-forge | |
- 1.17.1-fabric | |
- 1.18.2-forge | |
- 1.18.2-fabric | |
- 1.19.2-forge | |
- 1.19.2-fabric | |
- 1.19.4-forge | |
- 1.19.4-fabric | |
- 1.20.1-forge | |
- 1.20.1-fabric | |
- 1.20.4-neoforge | |
- 1.20.4-fabric | |
- 1.20.6-neoforge | |
- 1.20.6-fabric | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get cache key | |
id: cache_key | |
run: echo "gradle_key=gradle-`cat versions/mainProject`" >> $GITHUB_OUTPUT | |
- name: Cache Gradle stuff | |
uses: actions/cache@v3 | |
with: | |
key: ${{ steps.cache_key.outputs.gradle_key }}-${{ hashFiles('*.gradle.kts', 'gradle.properties', 'gradle/**') }} | |
restore-keys: ${{ steps.cache_key.outputs.gradle_key }}- | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
.gradle/loom-cache | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Install Xvfb | |
run: apt install xvfb | |
- name: Launch Xvfb | |
run: screen -d -m Xvfb :1 -screen 0 1920x1080x24 | |
- name: Run tests | |
run: | | |
./gradlew :${{ matrix.subproject }}:runTestHost --stacktrace & | |
./gradlew :${{ matrix.subproject }}:runTestJoiner --stacktrace && | |
fg | |
- name: Stop Xvfb | |
run: screen -X quit |