omise/omise-ruby

View on GitHub
.github/workflows/code-coverage.yml

Summary

Maintainability
Test Coverage
name: Push Test Coverage to SonarCloud

on:
  push:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: "3.2"
        bundler-cache: true
    - name: Build and test with Rake
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3
        bundle exec rake test
    - run: |
        rm -rf vendor
    - name: Fix Code Coverage Paths
      run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/coverage.json
    - name: SonarCloud Scan
      uses: SonarSource/sonarcloud-github-action@master
      env:
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}