Documentation #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test the action | |
permissions: | |
contents: read | |
on: [push, workflow_dispatch] | |
jobs: | |
test: | |
name: Test the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get kcov version | |
uses: sudo-bot/action-shunit2@latest | |
with: | |
cli: "kcov --version" | |
- name: Run tests (check mode) | |
uses: sudo-bot/action-shunit2@latest | |
with: | |
cli: "kcov --dump-summary ./coverage ./docker/tests/check.sh" | |
- name: Run tests directly | |
uses: sudo-bot/action-shunit2@latest | |
with: | |
cli: "./docker/tests/test.sh" | |
- name: Run tests with kcov coverage | |
uses: sudo-bot/action-shunit2@latest | |
with: | |
cli: "kcov --dump-summary ./coverage ./docker/tests/test.sh" | |
- name: Find files | |
run: find ./coverage -type f \( -name '*.json' -o -name '*.xml' \) -print | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# kcov generates: | |
# - cov.xml | |
# - cobertura.xml | |
# - sonarqube.xml | |
# - coverage.json | |
# - codecov.json | |
directory: ./coverage/ | |
fail_ci_if_error: true |