Skip to content

Modernize CI: ruby 3.0–4.0 matrix, pinned actions, audit/zizmor/lint, trusted publishing - #299

Merged
pcai merged 2 commits into
mainfrom
modernize/ci
Sep 10, 2026
Merged

Modernize CI: ruby 3.0–4.0 matrix, pinned actions, audit/zizmor/lint, trusted publishing#299
pcai merged 2 commits into
mainfrom
modernize/ci

Conversation

@pcai

@pcai pcai commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Modernizes Viewpoint's CI to the shared WinRb CI baseline:

  • CI matrix (.github/workflows/ci.yml, replacing old ruby.yml): ruby 3.0–4.0 on ubuntu-latest + windows-latest; all actions pinned by SHA (checkout v7.0.1, setup-ruby v1.321.0, zizmor v0.6.3). Drops EOL ruby 2.7 and unpinned setup-ruby@v1.
  • audit job: bundle-audit check --update + ruby-audit check (with the CVE-2026-41316 ignore for pre-4.0.3 rubies).
  • zizmor job: workflow security lint.
  • lint job: bundle exec rubocop --format github with a new .rubocop.yml (repo had none).
  • Trusted publishing: new .github/workflows/gem_push.yml + release environment (pcai as required reviewer), so publishing a GitHub release pushes the gem via OIDC — no API key or OTP needed.
  • Docs: new RELEASING.md, CHANGELOG.md, PR + issue templates; existing .github/dependabot.yml verified present.
  • Gemfile: added rubocop, bundler-audit (~> 0.9.3), ruby_audit (~> 3.1) (ruby_audit only on RUBY_VERSION >= 3.1.0). No changes to required_ruby_version in the gemspec.

Note: rubocop is new to this repo, so the lint job may surface many pre-existing offenses on first run — cleanup can be a follow-up.

Test plan

  • CI on this PR: test matrix across ruby 3.0–4.0 × ubuntu/windows, plus audit, zizmor, lint.

pcai added 2 commits September 9, 2026 23:25
- .github/dependabot.yml: add Dependabot cooldown (default-days: 7) so the
  zizmor dependabot-cooldown audit passes.
- viewpoint.gemspec: declare ostruct and base64 as runtime dependencies.
  Ruby 4.0 moved ostruct from default to bundled gems, so 'require
  ostruct' fails under 'bundle exec' without the declaration.
- .github/workflows/ci.yml: make the lint job advisory-only
  (continue-on-error) for this first pass; the legacy codebase has many
  pre-existing RuboCop offenses slated for a dedicated cleanup pass.
@pcai
pcai merged commit e29a6e6 into main Sep 10, 2026
29 of 31 checks passed
@pcai
pcai deleted the modernize/ci branch September 10, 2026 04:04
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