Skip to content

Commit

Permalink
Add coverage (#18)
Browse files Browse the repository at this point in the history
* add coverage

* add coveralls

* add coveralls action to workflow

* add badges

* fix newline
  • Loading branch information
danini-the-panini authored Jun 11, 2024
1 parent ef10d54 commit 8fb8455
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # install and cache dependencies

- name: Build parser
run: bundle exec racc lib/kdl/kdl.yy

- name: Run tests
run: bundle exec rake test

- name: Report Coveralls
uses: coverallsapp/github-action@v2
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ source "https://rubygems.org"
gemspec

gem "rake", "~> 12.0"
gem "minitest", "~> 5.0"

group :test do
gem "minitest", "~> 5.0"
gem "simplecov", require: false
gem "coveralls_reborn", require: false
end
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# KDL

[![Gem Version](https://badge.fury.io/rb/kdl.svg)](https://badge.fury.io/rb/kdl)
[![Actions Status](https://github.com/danini-the-panini/kdl-rb/workflows/Ruby/badge.svg)](https://github.com/danini-the-panini/kdl-rb/actions)
[![Coverage Status](https://coveralls.io/repos/github/danini-the-panini/kdl-rb/badge.svg?branch=main)](https://coveralls.io/github/danini-the-panini/kdl-rb?branch=main)

This is a Ruby implementation of the [KDL Document Language](https://kdl.dev)

Expand Down
8 changes: 8 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
require "simplecov"
require "coveralls"
SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start

$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "kdl"

Expand Down

0 comments on commit 8fb8455

Please sign in to comment.