steps: setup: image: alpine:latest commands: - apk add --no-cache bash curl git - mkdir -p ./.build - test -f ./install.sh && cp ./install.sh ./.build/install.sh || true - test -d ./bin && cp -r ./bin ./.build/ || true - test -d ./modules && cp -r ./modules ./.build/ || true - chmod -R a+rx ./.build || true syntax_and_shellcheck: image: alpine:latest depends_on: [setup] commands: - apk add --no-cache bash git shellcheck - cd ./.build - test -f ./install.sh - bash -n ./install.sh - shellcheck -S error ./install.sh - test -f ./bin/gameadm && bash -n ./bin/gameadm || true - test -f ./bin/gameadm && shellcheck -S error ./bin/gameadm || true install_alpine: image: alpine:latest depends_on: [setup] commands: - apk add --no-cache bash curl wget git podman coreutils sudo - cd ./.build - bash ./install.sh - test -x /usr/local/bin/gameadm - gameadm --version | grep -q "gameadm v" - gameadm list module_install_validate: image: alpine:latest depends_on: [install_alpine] commands: - apk add --no-cache bash curl wget git podman coreutils sudo - cd ./.build - bash ./install.sh - gameadm install mc --force - gameadm install rust --force - test -f /etc/minecraft-server.conf - test -f /etc/rust-server.conf - gameadm list | grep -E "mc|rust" - gameadm mc help - gameadm rust help podman_smoke_vfs: image: alpine:latest commands: - apk add --no-cache podman - mkdir -p /etc/containers - printf "[storage]\n driver = \"vfs\"\n" > /etc/containers/storage.conf - podman --version - podman --storage-driver=vfs run --rm alpine:3.19 echo ok | grep -q '^ok$' idempotency: image: alpine:latest depends_on: [install_alpine] commands: - apk add --no-cache bash curl wget git podman coreutils sudo - cd ./.build - bash ./install.sh - bash ./install.sh - gameadm --version - gameadm list cleanup: image: alpine:latest depends_on: [module_install_validate, idempotency] commands: - rm -f /usr/local/bin/gameadm || true - rm -rf /etc/gameadm || true - rm -f /etc/minecraft-server.conf /etc/rust-server.conf || true