From 738730600b376b5c8305b465fb84619380176af4 Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Sun, 2 Jul 2023 12:09:51 +0100 Subject: [PATCH] Setup matrix --- .github/workflows/e2e-testing.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-testing.yml b/.github/workflows/e2e-testing.yml index ebbb01a43c..edfe61df60 100644 --- a/.github/workflows/e2e-testing.yml +++ b/.github/workflows/e2e-testing.yml @@ -9,6 +9,20 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 + strategy: + matrix: + include: + - mcVersion: '1.16.5' + javaVersion: '16' + - mcVersion: '1.17.1' + javaVersion: '17' + - mcVersion: '1.18.2' + javaVersion: '18' + - mcVersion: '1.19.4' + javaVersion: '19' + - mcVersion: '1.20.1' + javaVersion: '20' + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -17,13 +31,13 @@ jobs: uses: actions/setup-java@v3.11.0 with: distribution: 'adopt' - java-version: '17' + java-version: ${{ matrix.javaVersion }} java-package: jdk architecture: x64 - - name: Download latest paper + - name: Download ${{ matrix.mcVersion }} Paper run: | - VERSION=$(curl -s https://api.papermc.io/v2/projects/paper | jq '.versions[-1]' -r) + VERSION="${{ matrix.mcVersion }}" BUILD_JAR=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" | jq '.builds[-1] | "\(.build) \(.downloads.application.name)"' -r) BUILD=$(echo "$BUILD_JAR" | awk '{print $1}') JAR_FILE=$(echo "$BUILD_JAR" | awk '{print $2}')