feat(pdf): drop node+puppeteer deps #277
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker image test | |
| on: | |
| pull_request: | |
| paths: | |
| - 'Dockerfile' | |
| - 'quarkdown-html/**' | |
| - '.github/workflows/docker-image-test.yml' | |
| - 'build.gradle.kts' | |
| - 'settings.gradle.kts' | |
| - 'gradle/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: docker-image-test-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| smoke-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Chrome version pin is in sync | |
| run: | | |
| VERSION=$(cat quarkdown-html-pdf/scripts/chrome-version.txt) | |
| if ! grep -q "HEADLESS_SHELL_VERSION=$VERSION" Dockerfile; then | |
| echo "ERROR: Dockerfile HEADLESS_SHELL_VERSION is out of sync with quarkdown-html-pdf/scripts/chrome-version.txt ($VERSION)" | |
| exit 1 | |
| fi | |
| - name: Build Docker image | |
| run: docker build -t quarkdown:test . | |
| - name: Install PDF inspection tools | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends poppler-utils | |
| - name: Test HTML output | |
| run: | | |
| workdir="$(mktemp -d)" | |
| chmod 777 "$workdir" | |
| cat <<'EOF' > "$workdir/main.qd" | |
| .docname {test} | |
| QuarkdownHtmlSmokeCheck | |
| EOF | |
| docker run --rm -v "$workdir:/work" -w /work quarkdown:test c main.qd -o output | |
| test -f "$workdir/output/test/index.html" | |
| test -s "$workdir/output/test/index.html" | |
| grep -F "QuarkdownHtmlSmokeCheck" "$workdir/output/test/index.html" | |
| - name: Test PDF output | |
| run: | | |
| workdir="$(mktemp -d)" | |
| chmod 777 "$workdir" | |
| cat <<'EOF' > "$workdir/main.qd" | |
| .docname {test} | |
| QuarkdownPdfSmokeCheck | |
| EOF | |
| docker run --rm -v "$workdir:/work" -w /work quarkdown:test c main.qd -o output --pdf | |
| test -f "$workdir/output/test.pdf" | |
| test -s "$workdir/output/test.pdf" | |
| pdftotext "$workdir/output/test.pdf" - | tee "$workdir/test.txt" | |
| grep -F "QuarkdownPdfSmokeCheck" "$workdir/test.txt" |