What? #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| name: SonarCloud Analysis | |
| jobs: | |
| sonarcloud: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Set up Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.1" | |
| - name: "Install dependencies" | |
| run: bundle install | |
| - name: Run tests for coverage | |
| run: bundle exec rspec | |
| env: | |
| COVERAGE: json | |
| - name: fix code coverage paths | |
| working-directory: ./coverage | |
| run: | | |
| sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace@g' coverage.json | |
| - name: print project | |
| working-directory: ./ | |
| run: ls -la | |
| - name: SonarCloud Scan | |
| uses: sonarsource/sonarcloud-github-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |