Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-shunit2

A GitHub action for shunit2 and kcov

Build docker imageTest the actioncodecov

You can find the image on Docker Hub

Docker Pulls

The shunit2 website The Kcov website

Example usage

test.sh

#!/bin/shtestEquality() {
assertEquals 1 1
}
. shunit2

.github/workflows/<name>.yml

Example usage with tests

name: run testspermissions:
contents: readon: [push]jobs:
tests:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- name: run my testsuses: sudo-bot/action-shunit2@latestwith:
cli: "./tests/test.sh"

Example usage with a script and kcov

name: run testspermissions:
contents: readon: [push]jobs:
tests:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- name: Run tests with kcov coverageuses: sudo-bot/action-shunit2@latestwith:
cli: "kcov --dump-summary ./coverage ./tests/run.sh"
- name: Upload coverage reports to Codecovuses: codecov/codecov-action@v4with:
token: ${{ secrets.CODECOV_TOKEN }}directory: ./coverage/fail_ci_if_error: true

Releases

Used by

Contributors

Languages