ci: upload coverage reports to codecov
This commit is contained in:
parent
fa569c8bb4
commit
2bf53abcf6
2 changed files with 24 additions and 4 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
@ -51,6 +51,11 @@ jobs:
|
|||
run: |
|
||||
bun run test
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
unit_tests:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -100,6 +105,11 @@ jobs:
|
|||
name: rspec-results-${{ github.job }}-${{ strategy.job-index }}
|
||||
path: tmp/rspec_${{ github.job }}_${{ strategy.job-index }}.junit.xml
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
system_tests:
|
||||
name: System tests
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -144,6 +154,11 @@ jobs:
|
|||
name: rspec-results-${{ github.job }}-${{ strategy.job-index }}
|
||||
path: tmp/rspec_${{ github.job }}_${{ strategy.job-index }}.junit.xml
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
save_test_reports:
|
||||
name: Save test reports
|
||||
needs: [unit_tests, system_tests]
|
||||
|
|
|
@ -5,10 +5,15 @@ SimpleCov.start "rails" do
|
|||
|
||||
command_name "RSpec process #{Process.pid}"
|
||||
|
||||
if ENV["CI"] # codecov compatibility
|
||||
require 'simplecov-cobertura'
|
||||
formatter SimpleCov::Formatter::CoberturaFormatter
|
||||
else
|
||||
formatter SimpleCov::Formatter::MultiFormatter.new([
|
||||
SimpleCov::Formatter::SimpleFormatter,
|
||||
SimpleCov::Formatter::HTMLFormatter
|
||||
])
|
||||
end
|
||||
|
||||
add_filter "/channels/" # not used
|
||||
groups.delete("Channels")
|
||||
|
|
Loading…
Reference in a new issue