File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 77 pull_request :
88 branches : main
99
10+ # OIDC permissions for qlty
11+ permissions :
12+ contents : read
13+ id-token : write
14+
1015jobs :
1116 test :
1217 runs-on : ubuntu-latest
2025
2126 env :
2227 BUNDLE_GEMFILE : ${{ matrix.gemfile }}
23- # CC_TEST_REPORTER_ID: 9a84a9f695de3b120b6fcead4e089b45420f7518fb2123dc5424f862d381c4ff
2428
2529 steps :
2630 - name : Checkout code
3842
3943 - name : Run linting
4044 run : bundle exec rake rubocop
45+
46+ - uses : qltysh/qlty-action/coverage@v2
47+ with :
48+ oidc : true
49+ format : simplecov
50+ files : coverage/.resultset.json
Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ RSpec::Core::RakeTask.new(:spec)
1313require "rubocop/rake_task"
1414RuboCop ::RakeTask . new ( :rubocop ) do |t |
1515 # See https://docs.rubocop.org/rubocop/usage/basic_usage.html
16- t . options = [ '--display-cop-names' , '--parallel' ]
16+ t . options = [ "--display-cop-names" , "--parallel" ]
17+ end
18+
19+ desc "Run Qlty code analysis"
20+ task :qlty do
21+ sh "qlty smells --all"
22+ sh "qlty metrics --all --max-depth=2 --sort complexity --limit 10"
23+ # sh "qlty lint" # Just runs rubocop, not necessary as we have a task for this already
1724end
1825
1926# default task: Add spec and rubocop to default tasks.
Original file line number Diff line number Diff line change 66rvm install ruby-$( cat .ruby-version)
77gem install bundler -v 2.2.18
88bundle install
9+
10+
11+ # Qlty CLI tool. Ref: https://docs.qlty.sh/cli/quickstart
12+ curl https://qlty.sh | sh
You can’t perform that action at this time.
0 commit comments