diff --git a/.github/workflows/e2e_all.yml b/.github/workflows/e2e_all.yml index 435d17f..e0386f9 100644 --- a/.github/workflows/e2e_all.yml +++ b/.github/workflows/e2e_all.yml @@ -35,6 +35,9 @@ jobs: - velocity - bungeecord - waterfall + folia: + - false + - true uses: ./.github/workflows/e2e_test.yml with: proxy: ${{ matrix.proxy }} diff --git a/.github/workflows/e2e_notable.yml b/.github/workflows/e2e_notable.yml index c47d7be..e65808f 100644 --- a/.github/workflows/e2e_notable.yml +++ b/.github/workflows/e2e_notable.yml @@ -13,14 +13,13 @@ jobs: build: name: Build uses: ./.github/workflows/nightly.yml - test: + paper: name: E2E test needs: build strategy: fail-fast: false matrix: version: - - 1.20.4 - 1.16.5 - 1.16.3 - 1.13.2 @@ -33,3 +32,22 @@ jobs: with: proxy: ${{ matrix.proxy }} version: ${{ matrix.version }} + paper-folia: + name: E2E test (with Folia) + needs: build + strategy: + fail-fast: false + matrix: + version: + - 1.20.4 + proxy: + - velocity + - bungeecord + folia: + - false + - true + uses: ./.github/workflows/e2e_test.yml + with: + proxy: ${{ matrix.proxy }} + version: ${{ matrix.version }} + folia: ${{ matrix.folia }} diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index 0b97e54..9814d4f 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -6,13 +6,15 @@ on: proxy: required: true type: string + folia: + type: boolean version: required: true type: string jobs: test: - name: E2E test (${{ inputs.version }}, ${{ inputs.proxy }}) + name: E2E test (${{ inputs.version }}, proxy=${{ inputs.proxy }}, folia=${{ inputs.folia }}) runs-on: ubuntu-latest defaults: run: @@ -20,6 +22,7 @@ jobs: env: # Legacy builder doesn't seem to properly mount /data folder inside server container for some reason DOCKER_BUILDKIT: 1 + FOLIA: "${{ inputs.folia && '1' || '0' }}" steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 diff --git a/README.md b/README.md index dfef57b..98dbf85 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ If you have any questions, please [join my Discord][Discord]. | [JourneyMap] | v5.7.1 / Minecraft 1.16.5 | v5.9.9 / Minecraft 1.20.1 | ✅ Supported | | VoxelMap | [v1.7.10][VoxelMap (old)] / Minecraft 1.8 | [v1.12.x][VoxelMap] / Minecraft 1.20.1 | ✅ Supported[[2]](https://github.com/turikhay/MapModCompanion/issues/8) | -[Folia](https://papermc.io/software/folia) is supported, but isn't tested regularly. Please report if the support is broken. +[Folia](https://papermc.io/software/folia) is supported, but isn't tested thoroughly. Please report if the support is broken. ## Installation diff --git a/tests_e2e/requirements.txt b/tests_e2e/requirements.txt index aeae7aa..7a183a0 100644 --- a/tests_e2e/requirements.txt +++ b/tests_e2e/requirements.txt @@ -1,7 +1,7 @@ -certifi==2023.11.17 -charset-normalizer==3.3.2 -idna==3.7 -PyYAML==6.0.1 -requests==2.32.0 -toml==0.10.2 -urllib3==2.1.0 +certifi>=2023.11.17 +charset-normalizer>=3.3.2 +idna>=3.7 +PyYAML>=6.0.1 +requests>=2.32.0 +toml>=0.10.2 +urllib3>=2.1.0 diff --git a/tests_e2e/run.py b/tests_e2e/run.py index 26e34a1..1164c98 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -89,6 +89,15 @@ '1.20.1', '1.20.2', '1.20.3', + )) + ), + **( + dict(( + version, + { + 'folia': True, + }, + ) for version in ( '1.20.4', )) ), @@ -222,11 +231,22 @@ def save(data): if enable_blue: logger.info("Use 127.0.0.1:9011 for blue server") + enable_folia = environ.get("FOLIA") == "1" + proxy_type, client_version, action = argv[1:] version_info = VERSIONS[client_version] - test_name = f"mmc_test_{proxy_type}_{client_version}" + if enable_folia and ("folia" not in version_info or not version_info["folia"]): + logger.info(f"Skipping: Folia is not supported on this version ({client_version})") + exit(0) + + test_name_suffix = "" + if enable_folia: + test_name_suffix += "folia_" + test_name_suffix += f"{proxy_type}_{client_version}" + + test_name = f"mmc_test_{test_name_suffix}" test_env_dir = PARENT_DIR / "test_env" / test_name makedirs(test_env_dir, exist_ok=True) @@ -281,6 +301,13 @@ def save(data): else: world_version = "1.17.1" + if enable_folia: + server_type = "FOLIA" + else: + server_type = "PAPER" + + logger.info(f"Selected server type: {server_type}") + for server_name in servers: server_desc = { 'build': { @@ -293,7 +320,8 @@ def save(data): ], }, 'environment': [ - f'VERSION={server_version}' + f'VERSION={server_version}', + f'TYPE={server_type}', ], 'ports': [ ]