Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7606157
Move testing from CircleCI to Github Actions
Janell-Huyck May 22, 2025
a877862
Add usage_notes.md for github actions
Janell-Huyck May 22, 2025
6a6c3dd
Add ruby installation to setup-ruby-deps/action.yml
Janell-Huyck May 23, 2025
610ba00
Put correct file at .github/actions/migrate/action.yml
Janell-Huyck May 23, 2025
e1e337f
Disable spring when running migrations
Janell-Huyck May 23, 2025
df3e65e
Disable spring when running tests
Janell-Huyck May 23, 2025
768d0c8
Stop caching webpack assets and build every time
Janell-Huyck May 23, 2025
8e9d389
Remove checking out code from the migrate action
Janell-Huyck May 23, 2025
0bf4660
Make spec/support/capybara.rb look for ENV['CHROME_BIN'] variable
Janell-Huyck May 23, 2025
89a03aa
Restore spec_helper to qa version
Janell-Huyck May 23, 2025
307406f
Restore Gemfile to qa version
Janell-Huyck May 23, 2025
29c0337
Add rubocop workflow
Janell-Huyck May 27, 2025
15e844a
Simplify Rubocop workflow to rely on native exit code and remove manu…
Janell-Huyck May 27, 2025
87f91e2
Remove extra 'require' statement(bug)
Janell-Huyck May 27, 2025
95e6c92
Use tee to output rubocop file
Janell-Huyck May 27, 2025
891c136
Intentionally add Rubocop error
Janell-Huyck May 27, 2025
7f3ecca
Use format 'progress' for human-readable error output
Janell-Huyck May 27, 2025
2f4992e
Fix testing rubocop error
Janell-Huyck May 27, 2025
f6e121f
Fix merge conflict with QA
Janell-Huyck May 28, 2025
a9418fe
Merge branch 'qa' into LIBTREATDB-145-run-rubocop-via-git-hub-workflows
Janell-Huyck Jun 2, 2025
6b5dc7e
Gemfile.lock update after merging in qa
Janell-Huyck Jun 2, 2025
6fc3c82
Test for rubocop CI
hortongn Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Ensure Rubocop Passes

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Ruby and install gems
uses: ./.github/actions/setup-ruby-deps

- name: Restore Rubocop Cache
uses: actions/cache@v3
with:
path: .rubocop_cache
key: rubocop-cache-${{ runner.os }}-${{ hashFiles('**/*.rb') }}
restore-keys: |
rubocop-cache-${{ runner.os }}-

- name: Run Rubocop and Save Output
run: |
mkdir -p tmp
bundle exec rubocop --format progress | tee tmp/rubocop-output.txt
shell: bash

- name: Upload Rubocop Report
uses: actions/upload-artifact@v4
with:
name: rubocop-report
path: tmp/rubocop-output.txt

- name: Save Rubocop Cache
uses: actions/cache@v3
with:
path: .rubocop_cache
key: rubocop-cache-${{ runner.os }}-${{ hashFiles('**/*.rb') }}
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require:
- rubocop
- rubocop-rails

inherit_from: .rubocop_todo.yml

plugins:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ PLATFORMS
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm64-darwin-23
arm-linux
arm-linux-gnu
arm-linux-musl
arm64-darwin
arm64-darwin-23
x86-linux
x86-linux-gnu
x86-linux-musl
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/abbreviated_treatment_reports_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

class AbbreviatedTreatmentReportsController < ApplicationController
def create
@abbreviated_treatment_report = AbbreviatedTreatmentReport.new
Expand Down
6 changes: 2 additions & 4 deletions spec/support/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
options = Selenium::WebDriver::Chrome::Options.new

# Force use of pinned Chrome binary if present (e.g., from GitHub Actions)
chrome_bin = ENV['CHROME_BIN']
if chrome_bin && File.exist?(chrome_bin)
options.binary = chrome_bin
end
chrome_bin = ENV.fetch('CHROME_BIN', nil)
options.binary = chrome_bin if chrome_bin && File.exist?(chrome_bin)

options.add_argument('--headless')
options.add_argument('--disable-gpu')
Expand Down
Loading