Skip to content

Commit

Permalink
ci: add codecov integration
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Aug 6, 2024
1 parent b005a70 commit 80a65d0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true

env:
CODECOV_TOKEN: 66eec255-1b3b-40a9-9ac3-30d76233c812

jobs:
rubocop:
name: Rubocop
Expand Down Expand Up @@ -82,6 +85,12 @@ jobs:
- name: Test
run: bundle exec rake

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-20.04' && matrix.ruby_ver == '3.2.4'
uses: codecov/codecov-action@v4
with:
token: ${{ env.CODECOV_TOKEN }}

test-container:
name: Ruby on ${{ matrix.os }}
container:
Expand All @@ -100,7 +109,7 @@ jobs:
run: |
apk --no-cache --upgrade add build-base cmake git bash \
autoconf make binutils-dev pkgconfig tar ruby-dev \
openjdk10-jre-headless linux-headers
openjdk11-jre-headless linux-headers
- name: Install bundler
shell: bash
Expand Down
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
== A helper Gem for tebako image packager

image:https://github.com/maxirmx/tebako-runtime/actions/workflows/test-and-release.yml/badge.svg["Test and release", link="https://github.com/maxirmx/tebako-runtime/actions/workflows/test-and-release.yml"]
image:https://codecov.io/gh/tamatebako/tebako-runtime/graph/badge.svg?token=CXNsUymRsM["Test coverage", link="https://codecov.io/gh/tamatebako/tebako-runtime"]

Tebako is an executable packager. It packages a set of files into a DwarFS file system for read-only purposes.

Expand Down
9 changes: 8 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tebako
#
Expand All @@ -26,6 +26,13 @@
# POSSIBILITY OF SUCH DAMAGE.

require "bundler/setup"

require "simplecov"
SimpleCov.start

require "simplecov-cobertura"
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

require "tebako-runtime"

RSpec.configure do |config|
Expand Down
2 changes: 2 additions & 0 deletions tebako-runtime.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "mnconvert", "~> 1.54"
spec.add_development_dependency "ruby-jing", "~> 0.0.3"
spec.add_development_dependency "sassc", "~> 2.4"
spec.add_development_dependency "simplecov"
spec.add_development_dependency "simplecov-cobertura"
spec.add_development_dependency "sinatra", "~> 4.0"
end

0 comments on commit 80a65d0

Please sign in to comment.