Add action typing

This commit is contained in:
Björn Kautler 2025-05-05 16:23:40 +02:00
parent 0b4ea9b681
commit e55cef4845
3 changed files with 114 additions and 0 deletions

View file

@ -0,0 +1,19 @@
name: Check Action Typing
on:
- push
- pull_request
permissions:
contents: read
jobs:
check_action_typing:
name: Check Action Typing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Action Typing
uses: typesafegithub/github-actions-typing@v2

View file

@ -8,6 +8,9 @@ This [Github Action](https://github.com/features/actions) displays test results
✔️ Provides final `conclusion` and counts of `passed`, `failed` and `skipped` tests as output parameters
Thanks to the provided [typings](action-types.yml), it is possible to use this action in a type-safe way using
https://github.com/typesafegithub/github-workflows-kt which allows writing workflow files using a type-safe Kotlin DSL.
**How it looks:**
|![](assets/fluent-validation-report.png)|![](assets/provider-error-summary.png)|![](assets/provider-error-details.png)|![](assets/mocha-groups.png)|
|:--:|:--:|:--:|:--:|

92
action-types.yml Normal file
View file

@ -0,0 +1,92 @@
# See https://github.com/typesafegithub/github-actions-typing/
inputs:
artifact:
type: string
name:
type: string
path:
type: list
separator: ','
list-item:
type: string
path-replace-backslashes:
type: boolean
reporter:
type: enum
allowed-values:
- dart-json
- dotnet-nunit
- dotnet-trx
- flutter-json
- java-junit
- jest-junit
- mocha-json
- rspec-json
- swift-xunit
list-suites:
type: enum
allowed-values:
- all
- failed
- none
list-tests:
type: enum
allowed-values:
- all
- failed
- none
max-annotations:
type: integer
fail-on-error:
type: boolean
fail-on-empty:
type: boolean
working-directory:
type: string
only-summary:
type: boolean
use-actions-summary:
type: boolean
badge-title:
type: string
token:
type: string
outputs:
conclusion:
type: enum
allowed-values:
- success
- failure
passed:
type: integer
failed:
type: integer
skipped:
type: integer
time:
type: integer
url:
type: string
url_html:
type: string