Skip to content

Test parallel test actions #7949

Test parallel test actions

Test parallel test actions #7949

Workflow file for this run

name: Java 21 CI (MC 1.20.6+)

Check failure on line 1 in .github/workflows/java-21-builds.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/java-21-builds.yml

Invalid workflow file

(Line: 17, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.JAVA_VERSION, (Line: 21, Col: 27): Unrecognized named-value: 'env'. Located at position 1 within expression: env.ENVIRONMENTS, (Line: 22, Col: 28): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PARALLEL_JOBS, (Line: 23, Col: 27): Unrecognized named-value: 'env'. Located at position 1 within expression: env.JAVA_VERSION, (Line: 26, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.JAVA_VERSION
on:
push:
branches:
- master
- 'dev/**'
pull_request:
env:
ENVIRONMENTS: 1.20.6,1.21.3,1.21.4,1.21.5,1.21.8,1.21.10
PARALLEL_JOBS: 3
JAVA_VERSION: 21
jobs:
prepare:
name: Java ${{ env.JAVA_VERSION }} CI - Parallelize Tests
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
uses: ./.github/workflows/parallelize-tests.yml
with:
environments: ${{ env.ENVIRONMENTS }}
parallel_jobs: ${{ env.PARALLEL_JOBS }}
java_version: ${{ env.JAVA_VERSION }}
build:
name: Java ${{ env.JAVA_VERSION }} CI (${{ matrix.display }})
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v5
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Skript and run test scripts
run: ./gradlew clean customTest -PtestEnvs="${{ matrix.envs }}" -PtestEnvJavaVersion=${{ env.JAVA_VERSION }}
- name: Upload Nightly Build
uses: actions/upload-artifact@v4
if: success() && matrix.id == 1
with:
name: skript-nightly
path: build/libs/*