https://github.com/project-tsurugi/tsurugi-annotations-action
GitHub Action to generate check-run annotations from outputs of static analysis tools and testing frameworks.
https://github.com/project-tsurugi/tsurugi-annotations-action
checkstyle clang-tidy ctest doxygen github-actions github-checks junit spotbugs
Last synced: 2 months ago
JSON representation
GitHub Action to generate check-run annotations from outputs of static analysis tools and testing frameworks.
- Host: GitHub
- URL: https://github.com/project-tsurugi/tsurugi-annotations-action
- Owner: project-tsurugi
- License: apache-2.0
- Created: 2020-05-26T05:42:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T09:35:12.000Z (over 1 year ago)
- Last Synced: 2024-02-01T09:33:14.490Z (over 1 year ago)
- Topics: checkstyle, clang-tidy, ctest, doxygen, github-actions, github-checks, junit, spotbugs
- Language: TypeScript
- Homepage:
- Size: 711 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# tsurugi-annotations-action
This GitHub action generates check-run annotations from outputs of static analysis tools and testing frameworks.
It is mainly focused on CI inside project-tsurugi projects, but can be used for other projects as well.
## Prerequisites
- Grant permissions for the GITHUB_TOKEN
- scope: checks
- access: write```yaml
jobs:
Build:
permissions:
checks: write
...
```## Usage
Simple usage
```yaml
steps:
- name: Verify
uses: project-tsurugi/tsurugi-annotations-action@v1
```With configurations
```yaml
steps:- name: Verify
uses: project-tsurugi/tsurugi-annotations-action@v1
if: always()
with:
junit_input: 'java/cost-accounting-benchmark/build/test-results/**/TEST-*.xml'
junit_test_src_dir: 'java/cost-accounting-benchmark/src/test/java'
spotbugs_input: 'java/cost-accounting-benchmark/build/reports/spotbugs/main/*.xml'
```## Output
- Generate Check Run If there are warnings output by supporting tools/frameworks.
- example: https://github.com/project-tsurugi/sharksfin/runs/17161949649
- Generate Job Summary if warnings present.
- example: https://github.com/project-tsurugi/sharksfin/actions/runs/6320027242/attempts/1#summary-17161928275## Supporting tools/frameworks
- [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/)
- [CTest](https://cmake.org/cmake/help/latest/manual/ctest.1.html)
- [Doxygen](https://www.doxygen.nl/)
- [Junit](https://junit.org/)
- [SpotBugs](https://spotbugs.github.io/)
- [Checkstyle](https://checkstyle.sourceforge.io/)## Configurations (Actions input)
| Name | Type | Default | Description |
|--------------------|---------|-------------|------------------------------------|
| `github_token` | string | `${{ github.token }}` | Use this if you wish to use a different GitHub token than the one provided by the workflow. |
| `strict` | bool | `true` | If annotation exists, set action to fail. |
| `clang_tidy_input` | bool | `build/clang-tidy.log` | input file of generating Clang-Tidy annotation. |
| `ctest_input` | bool | `build/**/*_gtest_result.xml` | input file of generating CTest annotation. |
| `doxygen_input` | bool | `build/doxygen-error.log` | input file of generating Doxygen annotation. |
| `junit_input` | bool | `build/test-results/**/TEST-*.xml` | input file of generating JUnit annotation. |
| `spotbugs_input` | bool | `build/reports/spotbugs/main/*.xml` | input file of generating SpotBugs annotation. |
| `checkstyle_input` | bool | `build/reports/checkstyle/main.xml` | input file of generating SpotBugs annotation. |
| `junit_test_src_dir` | bool | `src/test/java` | test source root directory. |
| `matrix` | bool | `false` | matrix context. |
| `checker` | string | empty string (Search for all supporting tool outputs) | enabled checker list (comma separated string) |## License
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)