586015c3f9
Gemfile.saas evals Gemfile, so shared gems should have identical versions in both lockfiles. This adds bin/bundle-drift to detect and fix drift: * `bin/bundle-drift check` compares shared gem versions * `bin/bundle-drift correct` seeds Gemfile.lock from Gemfile.saas.lock and re-locks, letting Bundler prune SaaS-only gems while preserving shared versions Adds drift check to bin/ci and GitHub CI. Corrects existing drift.
58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
gemfile-drift:
|
|
name: Gemfile drift
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: .ruby-version
|
|
bundler-cache: true
|
|
|
|
- name: Check for lockfile drift
|
|
run: bin/bundle-drift check
|
|
|
|
security:
|
|
name: Security
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: .ruby-version
|
|
bundler-cache: true
|
|
|
|
- name: Gem audit
|
|
run: bin/bundler-audit check --update
|
|
|
|
- name: Importmap audit
|
|
run: bin/importmap audit
|
|
|
|
- name: Brakeman audit
|
|
run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
|
|
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: .ruby-version
|
|
bundler-cache: true
|
|
|
|
- name: Lint code for consistent style
|
|
run: bin/rubocop
|