Files
mpq-packager/.gitea/workflows/ci.yml
T
paste 922aea9bc1
CI / build-and-smoke (push) Failing after 31s
Add MPQ verify modes, harden CI assertions, fix CRLF/docstring
- mpqpack gains --list and --cat (StormLib-backed) for reading archives back
- CI now asserts the archive lists the expected file and that version
  substitution landed inside the MPQ, not just that a file exists
- Dockerfile strips CRLF from entrypoint/package so local Windows builds work
- drop invalid escape in package.py docstring
2026-06-25 21:54:09 -05:00

44 lines
1.5 KiB
YAML

# CI for the packager itself: build the Docker image and smoke-test that it
# produces a non-empty patch-Z.mpq from the test fixture.
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build-and-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: docker build -t mpq-packager:ci .
- name: Package the fixture
run: |
set -euo pipefail
docker run --rm \
-e INPUT_MANIFEST=mpq.yaml \
-e INPUT_VERSION=v0.0.0-ci \
-e INPUT_OUT_DIR=/work/dist \
-e GITHUB_WORKSPACE=/work \
-v "$PWD/test:/work" \
mpq-packager:ci
- name: Assert archive is valid and contains the expected file
run: |
set -euo pipefail
test -s test/dist/patch-Z.mpq
echo "size: $(stat -c%s test/dist/patch-Z.mpq) bytes"
# Read the archive back with StormLib (mpqpack --list/--cat).
docker run --rm --entrypoint mpqpack -v "$PWD/test:/work" mpq-packager:ci \
--list /work/dist/patch-Z.mpq | tee /tmp/list.txt
grep -q 'Interface\\AddOns\\Fixture\\Hello.lua' /tmp/list.txt
docker run --rm --entrypoint mpqpack -v "$PWD/test:/work" mpq-packager:ci \
--cat /work/dist/patch-Z.mpq 'Interface\AddOns\Fixture\Hello.lua' \
| grep -q 'VERSION = "v0.0.0-ci"'
echo "OK: archive valid, path + substitution confirmed"