feat: added sponge 11+ support #12
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: E2E Tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| e2e-bukkit: | |
| runs-on: ubuntu-latest | |
| name: E2E - Bukkit | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: BanManagement/BanManager | |
| path: BanManager | |
| ref: master | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: "temurin" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-docker-e2e-${{ hashFiles('e2e/Dockerfile.tests', 'e2e/tests/package*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docker-e2e- | |
| - name: Build test runner image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: e2e | |
| file: e2e/Dockerfile.tests | |
| push: false | |
| load: true | |
| tags: e2e-tests:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
| - name: Move Docker cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| - name: Build BanManager Bukkit | |
| working-directory: BanManager | |
| run: ./gradlew :BanManagerBukkit:shadowJar --build-cache | |
| - name: Run E2E tests | |
| run: ./gradlew :BanManagerWebEnhancerE2E:testBukkit --build-cache -PbanManagerPath=BanManager | |
| timeout-minutes: 15 | |
| - name: Collect logs on failure | |
| if: failure() | |
| working-directory: e2e/platforms/bukkit | |
| run: | | |
| docker compose logs > ../../e2e-logs-bukkit.txt 2>&1 || true | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-logs-bukkit | |
| path: e2e-logs-bukkit.txt | |
| retention-days: 7 | |
| - name: Cleanup | |
| if: always() | |
| working-directory: e2e/platforms/bukkit | |
| run: docker compose down -v || true | |
| e2e-fabric: | |
| runs-on: ubuntu-latest | |
| name: E2E - Fabric-${{ matrix.mc_version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - mc_version: "1.20.1" | |
| task_suffix: "1_20_1" | |
| java_image: "java17" | |
| fabric_loader: "0.16.10" | |
| - mc_version: "1.21.1" | |
| task_suffix: "1_21_1" | |
| java_image: "java21" | |
| fabric_loader: "0.16.9" | |
| - mc_version: "1.21.4" | |
| task_suffix: "1_21_4" | |
| java_image: "java21" | |
| fabric_loader: "0.16.9" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: BanManagement/BanManager | |
| path: BanManager | |
| ref: master | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: "temurin" | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: "temurin" | |
| - name: Set JDK 21 as default | |
| run: echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .gradle/loom-cache | |
| key: ${{ runner.os }}-loom-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-loom- | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-docker-e2e-${{ hashFiles('e2e/Dockerfile.tests', 'e2e/tests/package*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docker-e2e- | |
| - name: Build test runner image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: e2e | |
| file: e2e/Dockerfile.tests | |
| push: false | |
| load: true | |
| tags: e2e-tests:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
| - name: Move Docker cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| - name: Build BanManager Fabric | |
| working-directory: BanManager | |
| run: ./gradlew :fabric:${{ matrix.mc_version }}:remapJar --build-cache | |
| - name: Run E2E tests | |
| run: ./gradlew :BanManagerWebEnhancerE2E:testFabric_${{ matrix.task_suffix }} --build-cache -PbanManagerPath=BanManager | |
| timeout-minutes: 15 | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| FABRIC_LOADER: ${{ matrix.fabric_loader }} | |
| - name: Collect logs on failure | |
| if: failure() | |
| working-directory: e2e/platforms/fabric | |
| run: | | |
| docker compose logs > ../../e2e-logs-${{ matrix.mc_version }}.txt 2>&1 || true | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| FABRIC_LOADER: ${{ matrix.fabric_loader }} | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-logs-${{ matrix.mc_version }} | |
| path: e2e-logs-${{ matrix.mc_version }}.txt | |
| retention-days: 7 | |
| - name: Cleanup | |
| if: always() | |
| working-directory: e2e/platforms/fabric | |
| run: docker compose down -v || true | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| FABRIC_LOADER: ${{ matrix.fabric_loader }} | |
| e2e-sponge: | |
| runs-on: ubuntu-latest | |
| name: E2E - Sponge-${{ matrix.mc_version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - mc_version: "1.20.6" | |
| task_suffix: "1_20_6" | |
| java_image: "java21" | |
| spongeversion: "1.20.6-11.0.0" | |
| - mc_version: "1.21.1" | |
| task_suffix: "1_21_1" | |
| java_image: "java21" | |
| spongeversion: "1.21.1-12.0.2" | |
| - mc_version: "1.21.3" | |
| task_suffix: "1_21_3" | |
| java_image: "java21" | |
| spongeversion: "1.21.3-13.0.0" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: BanManagement/BanManager | |
| path: BanManager | |
| ref: master | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: "temurin" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-docker-e2e-${{ hashFiles('e2e/Dockerfile.tests', 'e2e/tests/package*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docker-e2e- | |
| - name: Build test runner image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: e2e | |
| file: e2e/Dockerfile.tests | |
| push: false | |
| load: true | |
| tags: e2e-tests:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
| - name: Move Docker cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| - name: Build BanManager Sponge | |
| working-directory: BanManager | |
| run: ./gradlew :BanManagerSponge:shadowJar --build-cache | |
| - name: Run E2E tests | |
| run: ./gradlew :BanManagerWebEnhancerE2E:testSponge_${{ matrix.task_suffix }} --build-cache -PbanManagerPath=BanManager | |
| timeout-minutes: 15 | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| SPONGEVERSION: ${{ matrix.spongeversion }} | |
| - name: Collect logs on failure | |
| if: failure() | |
| working-directory: e2e/platforms/sponge | |
| run: | | |
| docker compose logs > ../../e2e-logs-sponge-${{ matrix.mc_version }}.txt 2>&1 || true | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| SPONGEVERSION: ${{ matrix.spongeversion }} | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-logs-sponge-${{ matrix.mc_version }} | |
| path: e2e-logs-sponge-${{ matrix.mc_version }}.txt | |
| retention-days: 7 | |
| - name: Cleanup | |
| if: always() | |
| working-directory: e2e/platforms/sponge | |
| run: docker compose down -v || true | |
| env: | |
| MC_VERSION: ${{ matrix.mc_version }} | |
| JAVA_IMAGE: ${{ matrix.java_image }} | |
| SPONGEVERSION: ${{ matrix.spongeversion }} | |
| e2e-sponge7: | |
| runs-on: ubuntu-latest | |
| name: E2E - Sponge7 (Legacy API 7) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: BanManagement/BanManager | |
| path: BanManager | |
| ref: master | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: "temurin" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-docker-e2e-${{ hashFiles('e2e/Dockerfile.tests', 'e2e/tests/package*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docker-e2e- | |
| - name: Build test runner image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: e2e | |
| file: e2e/Dockerfile.tests | |
| push: false | |
| load: true | |
| tags: e2e-tests:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
| - name: Move Docker cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| - name: Build BanManager Sponge7 | |
| working-directory: BanManager | |
| run: ./gradlew :BanManagerSponge7:shadowJar --build-cache | |
| - name: Run E2E tests | |
| run: ./gradlew :BanManagerWebEnhancerE2E:testSponge7 --build-cache -PbanManagerPath=BanManager | |
| timeout-minutes: 15 | |
| - name: Collect logs on failure | |
| if: failure() | |
| working-directory: e2e/platforms/sponge7 | |
| run: | | |
| docker compose logs > ../../e2e-logs-sponge7.txt 2>&1 || true | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-logs-sponge7 | |
| path: e2e-logs-sponge7.txt | |
| retention-days: 7 | |
| - name: Cleanup | |
| if: always() | |
| working-directory: e2e/platforms/sponge7 | |
| run: docker compose down -v || true |