Skip to content

Add GitHub Actions test workflow with private REFPROP - #151

Merged
raphaeltimbo merged 2 commits into
petrobras:mainfrom
raphaeltimbo:ci-github-actions
Jul 21, 2026
Merged

Add GitHub Actions test workflow with private REFPROP#151
raphaeltimbo merged 2 commits into
petrobras:mainfrom
raphaeltimbo:ci-github-actions

Conversation

@raphaeltimbo

Copy link
Copy Markdown
Collaborator

Adds CI that runs the full test suite (pytest ccp/tests -n 4 --dist loadfile) with REFPROP.

How REFPROP is kept private:

  • The compiled Linux build (librefprop.so + FLUIDS/MIXTURES) lives in the private repo raphaeltimbo/refprop-linux.
  • CI fetches it with a read-only deploy key stored as the REFPROP_DEPLOY_KEY actions secret (already configured), and points RPPREFIX at the checkout.
  • GitHub never provides secrets to workflows triggered by fork PRs, so the test job skips itself there — the binary cannot be exfiltrated via a malicious PR. Post-merge pushes to main (and workflow_dispatch) run the full REFPROP suite.
  • ⚠️ The pull_request trigger must never be changed to pull_request_target, which would expose the secret to fork PR code.

Also exposes ccp.REFPROP_AVAILABLE so CI can assert REFPROP was actually loaded instead of silently falling back to HEOS.

A validation run of this exact workflow (with the secret) is linked in the comments.

REFPROP is proprietary and cannot live in this public repository. The
workflow fetches a private repository containing the compiled Linux build
(librefprop.so + FLUIDS/MIXTURES) using a read-only deploy key stored as
the REFPROP_DEPLOY_KEY actions secret, points RPPREFIX at the checkout and
runs the full test suite.

Secrets are not exposed to workflows triggered by fork PRs, so the test
job skips itself when the key is absent - the REFPROP binary cannot be
exfiltrated through a malicious PR. Forks wanting CI must provide their
own private REFPROP repository and deploy key.

Also expose ccp.REFPROP_AVAILABLE so the workflow (and users) can assert
that REFPROP was actually picked up instead of silently falling back to
HEOS.
uv.lock is gitignored in this repo, so uv sync --locked cannot work in CI.
Sync without the flag and add a uv constraint (dev/CI resolution only, not
published metadata) keeping CoolProp on 7.x until ccp is adapted to the
exception-type and cubic-EOS roundoff changes in CoolProp 8.
@raphaeltimbo

Copy link
Copy Markdown
Collaborator Author

Validation run of this workflow with the secret (dispatched on a temporary upstream branch, now deleted): https://github.com/petrobras/ccp/actions/runs/29769608763159 passed in 9m47s, REFPROP 10.0.0.99 loaded and asserted.

@raphaeltimbo
raphaeltimbo merged commit cb2e830 into petrobras:main Jul 21, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant