Skip to content

Commit

Permalink
[ISSUE-68] Fix github ci for cross-repos
Browse files Browse the repository at this point in the history
  • Loading branch information
jlurena committed Jul 9, 2024
1 parent b9c953b commit 1d1789b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@

name: Code Coverage

on: [push, workflow_dispatch, pull_request]
on: [pull_request]

permissions:
contents: read

jobs:
test:
permissions:
checks: write
contents: write
permissions: write-all
runs-on: ubuntu-20.04
strategy:
matrix:
Expand All @@ -35,10 +33,8 @@ jobs:
- name: Run tests
run: bundle exec rake
- name: Code Coverage
uses: joshmfrankel/simplecov-check-action@main
uses: romeovs/lcov-reporter-action@v0.3.1
with:
check_job_name: Code Coverage
github_token: ${{ secrets.GITHUB_TOKEN }}
minimum_suite_coverage: 100
lcov-file: ./coverage/lcov/cached_resource.lcov
- name: Lint
uses: standardrb/standard-ruby-action@v1
3 changes: 2 additions & 1 deletion cached_resource.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "pry-byebug"
s.add_development_dependency "rake"
s.add_development_dependency "rspec"
s.add_development_dependency "simplecov-lcov", "~> 0.8.0"
s.add_development_dependency "simplecov", "~> 0.22.0"
s.add_development_dependency "timecop", "~> 0.9.10"
s.add_development_dependency "standard", "~> 1.39", ">= 1.39.1"
s.add_development_dependency "timecop", "~> 0.9.10"
end
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
require "simplecov"
require "simplecov-lcov"

SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.start do
add_filter "/spec/"
add_group "Lib", "lib/"
minimum_coverage 100
refuse_coverage_drop

formatter SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::LcovFormatter,
SimpleCov::Formatter::HTMLFormatter
])
end

require "rubygems"
Expand Down

0 comments on commit 1d1789b

Please sign in to comment.