Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 184 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,187 @@ jobs:
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
1 change: 0 additions & 1 deletion common/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ ignoreContains:
- '[PlugMan]'
- 'Metrics'
- 'For help, type "help"'

Loading