A GitHub action for shunit2 and kcov
You can find the image on Docker Hub
The shunit2 website The Kcov website
#!/bin/sh
testEquality() {
assertEquals 1 1
}
. shunit2
name: run tests
permissions:
contents: read
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: run my tests
uses: sudo-bot/action-shunit2@latest
with:
cli: "./tests/test.sh"
name: run tests
permissions:
contents: read
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests with kcov coverage
uses: sudo-bot/action-shunit2@latest
with:
cli: "kcov --dump-summary ./coverage ./tests/run.sh"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
fail_ci_if_error: true