Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
otherguy committed Sep 6, 2024
1 parent e365932 commit 7d809c7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,25 @@ jobs:
run: bundle exec rubocop --format progress --format json --out rubocop-result.json
- name: Run tests
run: bundle exec rspec spec
- name: Set version in sonar-project.properties
run: sed -i -e "s/sonar.projectVersion=.*$/sonar.projectVersion=$(bundle exec rake version)/g" sonar-project.properties
- name: DEBUG
run: >
cat sonar-project.properties
pwd
ls -al /home/runner/work/rspec-sonarqube-formatter/rspec-sonarqube-formatter/spec/rspec_sonarqube_formatter_spec.rb
ls -al /home/runner/work/
ls -al
# SonarCloud
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarcloud-github-action@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
# Codecov
- uses: codecov/codecov-action@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ sonar.projectVersion=

sonar.language=ruby

sonar.text.inclusions.activate=true

sonar.pullrequest.provider=GitHub
sonar.pullrequest.github.repository=otherguy/rspec-sonarqube-formatter

sonar.sourceEncoding=UTF-8

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.projectBaseDir=.
sonar.sources=lib
sonar.sources=.
sonar.tests=spec
sonar.test.inclusions=**/*_spec.rb

Expand Down
2 changes: 1 addition & 1 deletion tasks/version.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ task :version, [:version] do |_task, args|
current_version = spec.version.to_s

if args[:version].nil?
puts "Version: #{current_version}"
puts "#{current_version}"
exit 0
end

Expand Down

0 comments on commit 7d809c7

Please sign in to comment.