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 60e7a4f commit 66bb54d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,6 @@ 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: Relativize Paths
run: |
sed -i -e "s#$(pwd)/#/github/workspace/#g" coverage/coverage.json
cat coverage/coverage.json
# SonarCloud
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_SCANNER_JAVA_OPTS: '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED'
with:
args: >
-Dsonar.verbose=false
# Codecov
- uses: codecov/codecov-action@v4
with:
Expand All @@ -94,3 +78,20 @@ jobs:
debug: true
coverageLocations: |
coverage/lcov.info:lcov
# Update version for SonarCloud
- name: Set version in sonar-project.properties
run: sed -i -e "s/sonar.projectVersion=.*$/sonar.projectVersion=$(bundle exec rake version)/g" sonar-project.properties
# Fix paths for SonarCloud, because it uses a different container
- name: Fix paths for SonarCloud
run: |
sed -i -e "s#$(pwd)/#/github/workspace/#g" coverage/coverage.json
# SonarCloud
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_SCANNER_JAVA_OPTS: '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED'
with:
args: >
-Dsonar.verbose=false
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ sonar.language=ruby

sonar.text.inclusions.activate=true

sonar.exclusions=spec,coverage

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

Expand Down

0 comments on commit 66bb54d

Please sign in to comment.