Repository navigation
Add more versions to MinecraftVersions.kt #2254
Workflow file for this run
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: ['*'] | |
| pull_request: | |
| branches: ['*'] | |
| jobs: | |
| build: | |
| name: Build | |
| strategy: | |
| matrix: | |
| os: | |
| - 'ubuntu-latest' | |
| - 'macos-latest' | |
| # - 'windows-latest' # On Windows, tests are flaky for some reason | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - uses: actions-ecosystem/action-regex-match@d50fd2e7a37d0e617aea3d7ada663bd56862b9cc | |
| id: branch-match | |
| with: | |
| text: ${{ github.ref }} | |
| regex: '^refs\/heads\/\d{4}\.\d$' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/dev' && steps.branch-match.outputs.match == '' }} | |
| - shell: bash | |
| run: | | |
| mkdir -p ~/.gradle/ | |
| echo -e '\norg.gradle.jvmargs=-Xmx4G\n' >> ~/.gradle/gradle.properties | |
| - name: Build | |
| run: ./gradlew :build --stacktrace | |
| env: | |
| NO_SENTRY: "true" | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.os }} | |
| path: build/reports |