Add GitLab CI and a kernel test that signs real files
Part of #3596034 (closed).
Problem/Motivation
The project has no .gitlab-ci.yml. Signing is only tested by hand, so a change in the manifest or a new c2patool release can break it unnoticed.
Proposed resolution
- Add the standard Drupal CI template, with the previous major.
- Install c2patool in the PHPUnit job for the oldest and newest supported versions, 0.27.x and 0.28.x.
- Add a kernel test that signs a plain JPEG and a C2PA 2.x JPEG through the module, then reads them back with c2patool. It skips when c2patool is missing.
Definition of done
- Pipeline runs on every MR and on 1.x
- PHPUnit runs once per c2patool version, and the job log shows
c2patool --version - Plain JPEG: one valid manifest,
claim_generator_infowith name and icon - C2PA 2.x JPEG: two manifests, the parent ingredient keeps the original one
- Without c2patool the test is skipped, not failed
- Linters do not block the pipeline until their existing errors are fixed
Testing instructions
- Open the MR pipeline. Both c2patool jobs are green on the current and previous major.
- In a test branch, require
jrglasgow/c2patool0.5.2. The icon case fails. - Run the test locally without c2patool. It reports 2 skipped.
AI Compliance
🤖 Generated with the help of an LLM, reviewed and approved by me before posting.