Run tests #140
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
# SPDX-License-Identifier: MIT | |
# SPDX-FileCopyrightText: "2022 smdn <smdn@smdn.jp>" | |
name: Run tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/**/*.cs' | |
- 'src/**/*.csproj' | |
- 'tests/**/*.cs' | |
- 'tests/**/*.csproj' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'src/**/*.cs' | |
- 'src/**/*.csproj' | |
- 'tests/**/*.cs' | |
- 'tests/**/*.csproj' | |
workflow_dispatch: | |
inputs: | |
project: | |
description: "The project name to run the test." | |
required: false | |
type: string | |
os: | |
description: "The OS label which run the test on. (ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest, etc.)" | |
required: false | |
type: string | |
dotnet_sdk_version: | |
description: "The minimum .NET SDK version which is used to run tests." | |
required: false | |
type: string | |
verbose: | |
description: "If true, enables verbose output." | |
required: false | |
type: boolean | |
default: false | |
extra_options_common: | |
description: "The common extra options to be set on running the `dotnet restore/build/test` command." | |
required: false | |
type: string | |
dotnet_test_options_verbosity_level: | |
description: "The argument to be set to the `--verbosity <LEVEL>` option of the `dotnet test` command. <LEVEL> := q[uiet], m[inimal], n[ormal], d[etailed], diag[nostic]" | |
required: false | |
type: string | |
dotnet_test_options_framework: | |
description: "The argument to be set to the `--framework <FRAMEWORK>` option of the `dotnet test` command." | |
required: false | |
type: string | |
dotnet_test_options_filter_expression: | |
description: "The argument to be set to the `--filter <EXPRESSION>` option of the `dotnet test` command." | |
required: false | |
type: string | |
jobs: | |
run-test: | |
name: Run tests | |
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.4.0 | |
with: | |
project: ${{ inputs.project }} | |
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest' || inputs.os }} | |
verbose: ${{ inputs.verbose == 'true' }} | |
path_proj_install_project_assets: "eng/InstallProjectAssets.proj" | |
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '8.0.100' || inputs.dotnet_sdk_version }} | |
timeout_minutes_test_job: 10 | |
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]" | |
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]" | |
extra_options_common: ${{ inputs.extra_options_common }} | |
dotnet_test_options_verbosity_level: ${{ inputs.dotnet_test_options_verbosity_level }} | |
dotnet_test_options_framework: ${{ inputs.dotnet_test_options_framework }} | |
dotnet_test_options_filter_expression: ${{ inputs.dotnet_test_options_filter_expression }} | |
secrets: | |
token_repo: ${{ secrets.GITHUB_TOKEN }} |