File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ name: CI
22
33on :
44 workflow_call :
5+ inputs :
6+ test-command :
7+ description : ' The command to run tests'
8+ required : false
9+ type : string
10+ default : ' bundle exec rspec'
511jobs :
6- rspec :
12+ run_tests :
713 runs-on : ubuntu-latest
814 strategy :
915 matrix :
1319 - 3.3
1420 env :
1521 BUNDLE_GEMFILE : Gemfile
16- name : " RSpec tests: Ruby ${{ matrix.ruby }}"
22+ name : " Run tests: Ruby ${{ matrix.ruby }}"
1723 steps :
1824 - uses : actions/checkout@v4
1925 - name : Install ripgrep
2430 bundler-cache : true
2531 ruby-version : ${{ matrix.ruby }}
2632 - name : Run tests
27- run : bundle exec rspec
33+ run : ${{ inputs.test-command }}
2834 static_type_check :
2935 name : " Type Check"
3036 runs-on : ubuntu-latest
5157 run : bundle exec rubocop
5258 notify_on_failure :
5359 runs-on : ubuntu-latest
54- needs : [rspec , static_type_check, rubocop]
60+ needs : [run_tests , static_type_check, rubocop]
5561 if : ${{ failure() && github.ref == 'refs/heads/main' }}
5662 env :
5763 SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments