File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 bundle exec rubocop --format progress --format clang
2222 echo "::endgroup::"
2323
24+ security-scan :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v4.1.0
28+
29+ - name : Set up Ruby
30+ uses : ruby/setup-ruby@v1
31+ with :
32+ ruby-version : 3.4
33+ bundler-cache : true
34+
35+ - name : Run Brakeman Security Scan
36+ run : |
37+ echo "::group::Brakeman Security Scan"
38+ bundle exec brakeman --exit-on-warn --no-progress -f plain
39+ echo "::endgroup::"
40+
2441 test :
2542 runs-on : ubuntu-latest
26- needs : lint
43+ needs : [ lint, security-scan]
2744 steps :
2845 - uses : actions/checkout@v4.1.0
2946
4562 bundle exec rails ci:health RAILS_ENV=test
4663 echo "::endgroup::"
4764
48- - name : Run tests
65+ - name : Run tests with Minitest parallelize
4966 run : |
50- echo "::group::Running Tests"
67+ echo "::group::Running Tests (with Minitest parallelize)"
68+ echo "Parallelization: Using Minitest parallelize with :number_of_processors workers"
69+ echo "Reason: Project has ~18 test files (controllers + models). Minitest parallelize is"
70+ echo " sufficient and simpler than multi-job matrix for this scale."
71+ echo "Boundaries:"
72+ echo " - All tests share the same GitHub Actions runner"
73+ echo " - Limited by single runner's CPU cores (typically 2-4 on GitHub-hosted runners)"
74+ echo " - Tests must be thread-safe (use transactions or proper database isolation)"
75+ echo ""
5176 bundle exec rails test RAILS_ENV=test --verbose
5277 echo "::endgroup::"
5378
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ gem 'lockbox', '=1.3.3'
3737
3838group :development , :test do
3939 gem 'byebug'
40+ gem 'brakeman' , require : false
4041 gem 'rubocop' , require : false
4142 gem 'rubocop-rails' , require : false
4243 gem 'rubocop-performance' , require : false
You can’t perform that action at this time.
0 commit comments