From 13b6741465a3de4bb480d8d8a2046b179609c70f Mon Sep 17 00:00:00 2001 From: Andy Cohen Date: Fri, 27 Feb 2026 21:00:00 -0600 Subject: [PATCH 1/3] Update CI Workflow Template --- .github/templates/ci.yml | 71 +++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/.github/templates/ci.yml b/.github/templates/ci.yml index ecbe453a..679adffa 100644 --- a/.github/templates/ci.yml +++ b/.github/templates/ci.yml @@ -2,38 +2,43 @@ name: CI on: push: + branches: [ main ] pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.ref }} cancel-in-progress: true env: + BUNDLE_WITHOUT: production CI: true RAILS_ENV: test - POSTGRES_USER: root + POSTGRES_USER: postgres POSTGRES_PASSWORD: password + SECRET_KEY_BASE: '123' # Dummy value for tests jobs: - compile_assets: - name: Compile assets + project-stats: + name: Project Stats runs-on: blacksmith-4vcpu-ubuntu-2404 - timeout-minutes: 5 - outputs: - cache-hit: ${{ steps.check-asset-cache.outputs.cache-hit }} + timeout-minutes: 3 steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + - uses: RoleModel/actions/project-stats@v3 - - uses: RoleModel/actions/compile-assets@v2 + compile-assets: + name: Compile Assets + runs-on: blacksmith-4vcpu-ubuntu-2404 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v6 + - uses: RoleModel/actions/compile-assets@v3 id: check-asset-cache non-system-test: - name: Linting & Ruby Non-System Tests - runs-on: blacksmith-8vcpu-ubuntu-2404 + name: Linting, Security, & Ruby Tests + runs-on: blacksmith-4vcpu-ubuntu-2404 timeout-minutes: 5 - needs: compile_assets - if: always() && (needs.compile_assets.outputs.cache-hit == 'true' || (needs.compile_assets.result == 'success')) services: postgres: @@ -41,22 +46,29 @@ jobs: ports: - "5432:5432" env: - POSTGRES_USER: root + POSTGRES_USER: postgres POSTGRES_PASSWORD: password steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - - name: Run shared flow - uses: RoleModel/actions/linting-and-non-system-tests@v2 + - run: bin/bundler-audit + - run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error + + - uses: RoleModel/actions/linting-and-non-system-tests@v3 + with: + needs-compiled-assets: false + linting_step_required: true + linting_step_command: bundle exec rubocop --format github system-test: name: Ruby System Tests - runs-on: blacksmith-16vcpu-ubuntu-2404 + runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10 - if: always() && (needs.compile_assets.outputs.cache-hit == 'true' || (needs.compile_assets.result == 'success')) - needs: compile_assets + needs: compile-assets services: postgres: @@ -64,18 +76,9 @@ jobs: ports: - "5432:5432" env: - POSTGRES_USER: root + POSTGRES_USER: postgres POSTGRES_PASSWORD: password steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup vips - run: | - sudo apt-get update - sudo apt-get install -y libvips - - - name: Run shared flow - uses: RoleModel/actions/system-tests@v2 - + - uses: actions/checkout@v6 + - uses: RoleModel/actions/system-tests@v3 From 9958e6709a1655138ac2721568c644e3761c4587 Mon Sep 17 00:00:00 2001 From: Andy Cohen Date: Fri, 27 Feb 2026 21:32:39 -0600 Subject: [PATCH 2/3] bin/bump_version --patch --- Gemfile.lock | 2 +- example_rails7/Gemfile.lock | 2 +- example_rails8/Gemfile.lock | 4 ++-- lib/rolemodel_rails/version.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 54ad989b..24bb1ebc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rolemodel_rails (0.26.0) + rolemodel_rails (0.26.1) rails (> 7.1) GEM diff --git a/example_rails7/Gemfile.lock b/example_rails7/Gemfile.lock index 33368a1d..7efb03db 100644 --- a/example_rails7/Gemfile.lock +++ b/example_rails7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rolemodel_rails (0.26.0) + rolemodel_rails (0.26.1) rails (> 7.1) GEM diff --git a/example_rails8/Gemfile.lock b/example_rails8/Gemfile.lock index a3f1a18c..a1e93625 100644 --- a/example_rails8/Gemfile.lock +++ b/example_rails8/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rolemodel_rails (0.26.0) + rolemodel_rails (0.26.1) rails (> 7.1) GEM @@ -522,7 +522,7 @@ CHECKSUMS regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4 reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 - rolemodel_rails (0.26.0) + rolemodel_rails (0.26.1) rubocop (1.84.1) sha256=14cc626f355141f5a2ef53c10a68d66b13bb30639b26370a76559096cc6bcc1a rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834 diff --git a/lib/rolemodel_rails/version.rb b/lib/rolemodel_rails/version.rb index 3914e82f..7183077e 100644 --- a/lib/rolemodel_rails/version.rb +++ b/lib/rolemodel_rails/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RolemodelRails - VERSION = '0.26.0' + VERSION = '0.26.1' end From bb5e6fc7b8411fc469ab3bb662d34fae9b7812d8 Mon Sep 17 00:00:00 2001 From: Andy Cohen Date: Fri, 27 Feb 2026 21:37:35 -0600 Subject: [PATCH 3/3] fix failing spec --- .github/templates/ci.yml | 2 +- spec/generators/rolemodel/github_generator_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/templates/ci.yml b/.github/templates/ci.yml index 679adffa..d2370b70 100644 --- a/.github/templates/ci.yml +++ b/.github/templates/ci.yml @@ -65,7 +65,7 @@ jobs: linting_step_command: bundle exec rubocop --format github system-test: - name: Ruby System Tests + name: System Tests runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10 needs: compile-assets diff --git a/spec/generators/rolemodel/github_generator_spec.rb b/spec/generators/rolemodel/github_generator_spec.rb index 5663b5ff..ff05834e 100644 --- a/spec/generators/rolemodel/github_generator_spec.rb +++ b/spec/generators/rolemodel/github_generator_spec.rb @@ -18,7 +18,7 @@ it 'creates ci.yml and updates the database.yml' do assert_file '.github/workflows/ci.yml' do |content| - expect(content).to include('Linting & Ruby Non-System Tests') + expect(content).to include('Linting, Security, & Ruby Tests') end assert_file 'config/database.yml' do |content|