From 87d167714b03bf9c63db125779ec40d917c6a549 Mon Sep 17 00:00:00 2001 From: Tony Milan Date: Tue, 8 Sep 2026 10:52:41 +0100 Subject: [PATCH] smoke test workflow to run on PR pipeline --- .github/workflows/{ci.yml => ci.yml.disabled} | 0 .github/workflows/smoke-test.yml | 36 +++++++++++++++++++ 2 files changed, 36 insertions(+) rename .github/workflows/{ci.yml => ci.yml.disabled} (100%) create mode 100644 .github/workflows/smoke-test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml.disabled similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/ci.yml.disabled diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 000000000..b2a9c53da --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,36 @@ +name: Smoke Test + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + smoke: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2" + bundler-cache: true + + - name: Generate a PDF and verify it's valid + run: | + bundle exec ruby -Ilib -e ' + require "prawn" + + Prawn::Document.generate("/tmp/smoke_test.pdf") do + text "Hello, World!" + end + + content = File.binread("/tmp/smoke_test.pdf") + raise "PDF is empty" if content.empty? + raise "Missing PDF header" unless content.start_with?("%PDF-") + raise "Missing EOF marker" unless content.include?("%%EOF") + + puts "Generated a #{content.bytesize}-byte PDF successfully" + '