Skip to content

feat: Add runtime scroll testing #60

feat: Add runtime scroll testing

feat: Add runtime scroll testing #60

name: Test Scrolls
on:
pull_request:
paths:
- 'scrolls/**'
- '.github/workflows/test-scrolls-runtime.yml'
- 'scripts/test-scroll-runtime.sh'
push:
branches:
- master
paths:
- 'scrolls/**'
- '.github/workflows/test-scrolls-runtime.yml'
- 'scripts/test-scroll-runtime.sh'
jobs:
# Test all Minecraft Vanilla versions
test-vanilla:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test all Vanilla versions
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
FAILED=0
for scroll in scrolls/minecraft/minecraft-vanilla/*/; do
echo "Testing $scroll"
if ! scripts/test-scroll-runtime.sh "${scroll%/}"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 300 # 5 hours for ~81 versions
# Test all PaperMC versions
test-paper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test all PaperMC versions
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
FAILED=0
for scroll in scrolls/minecraft/papermc/*/; do
echo "Testing $scroll"
if ! scripts/test-scroll-runtime.sh "${scroll%/}"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 300
# Test all Spigot versions
test-spigot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test all Spigot versions
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
FAILED=0
for scroll in scrolls/minecraft/minecraft-spigot/*/; do
echo "Testing $scroll"
if ! scripts/test-scroll-runtime.sh "${scroll%/}"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 300
# Test all Forge versions
test-forge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test all Forge versions
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
FAILED=0
for scroll in scrolls/minecraft/forge/*/; do
echo "Testing $scroll"
if ! scripts/test-scroll-runtime.sh "${scroll%/}"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 300
# Test Cuberite
test-cuberite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test Cuberite
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
scripts/test-scroll-runtime.sh "scrolls/minecraft/cuberite/latest"
timeout-minutes: 15
# Test Rust scrolls
test-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install SteamCMD (for Rust)
uses: CyberAndrii/setup-steamcmd@v1
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test Rust scrolls
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
FAILED=0
for scroll in scrolls/rust/*/latest; do
echo "Testing $scroll"
if ! scripts/test-scroll-runtime.sh "$scroll"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 30
# Test all LGSM versions
test-lgsm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install SteamCMD (for LGSM games)
uses: CyberAndrii/setup-steamcmd@v1
- name: Download druid-cli
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid"
out-file-path: "/tmp"
- name: Download druid_rcon plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon"
out-file-path: "/tmp"
- name: Download druid_rcon_web_rust plugin
uses: robinraju/release-downloader@v1
with:
repository: "highcard-dev/druid-cli"
latest: true
fileName: "druid_rcon_web_rust"
out-file-path: "/tmp"
- name: Make binaries executable
run: |
chmod +x /tmp/druid /tmp/druid_rcon /tmp/druid_rcon_web_rust
/tmp/druid version
- name: Test released LGSM scrolls only
env:
TIMEOUT: 600
run: |
chmod +x scripts/test-scroll-runtime.sh
# Only test LGSM scrolls that are actually released (from release.yml)
RELEASED_LGSM=(
"scrolls/lgsm/pwserver"
"scrolls/lgsm/arkserver"
"scrolls/lgsm/untserver"
"scrolls/lgsm/dayzserver"
"scrolls/lgsm/sdtdserver"
"scrolls/lgsm/gmodserver"
"scrolls/lgsm/cs2server"
"scrolls/lgsm/pzserver"
"scrolls/lgsm/terrariaserver"
"scrolls/lgsm/csgoserver"
)
FAILED=0
for scroll in "${RELEASED_LGSM[@]}"; do
echo "Testing $scroll"
# Run as non-root user (LGSM requirement)
if ! bash -c "cd $PWD && scripts/test-scroll-runtime.sh '$scroll'"; then
echo "FAILED: $scroll"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "Total failures: $FAILED"
exit 1
fi
timeout-minutes: 300