Skip to content

Commit 041e113

Browse files
committed
Add Codecov integration and badge
1 parent 4340792 commit 041e113

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,23 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v3
1616

17-
- name: Install shellcheck
18-
run: sudo apt-get update && sudo apt-get install -y shellcheck
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y shellcheck kcov
1921
2022
- name: Check for syntax errors (lint)
2123
run: make lint
2224

23-
- name: Run tests
24-
run: make test
25+
- name: Run tests with coverage
26+
run: |
27+
mkdir -p coverage
28+
kcov --include-path=./lib_ini.sh coverage ./run_tests.sh
29+
echo "Coverage report generated"
30+
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v3
33+
with:
34+
directory: ./coverage
35+
fail_ci_if_error: false
36+
verbose: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Bash INI Parser
22

33
[![CI](https://github.com/lsferreira42/bash-ini-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/lsferreira42/bash-ini-parser/actions/workflows/ci.yml)
4+
[![codecov](https://codecov.io/gh/lsferreira42/bash-ini-parser/branch/main/graph/badge.svg)](https://codecov.io/gh/lsferreira42/bash-ini-parser)
45

56
A robust shell script library for parsing and manipulating INI configuration files in Bash.
67

0 commit comments

Comments
 (0)