Skip to content

Commit 5f7f456

Browse files
committed
add workflow for running tests
1 parent 086643d commit 5f7f456

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: MIT
2+
# SPDX-FileCopyrightText: "2022 smdn <smdn@smdn.jp>"
3+
4+
name: Run tests
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
paths:
10+
- 'src/**/*.cs'
11+
- 'src/**/*.csproj'
12+
- 'tests/**/*.cs'
13+
- 'tests/**/*.csproj'
14+
15+
pull_request:
16+
branches: [ main ]
17+
paths:
18+
- 'src/**/*.cs'
19+
- 'src/**/*.csproj'
20+
- 'tests/**/*.cs'
21+
- 'tests/**/*.csproj'
22+
23+
workflow_dispatch:
24+
inputs:
25+
project:
26+
description: "The project name to run the test."
27+
required: false
28+
type: string
29+
os:
30+
description: "The OS label which run the test on. (ex: ubuntu-latest, windows-latest, macos-latest)"
31+
required: false
32+
type: string
33+
34+
jobs:
35+
run-test:
36+
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.0.2
37+
with:
38+
project: ${{ github.event.inputs.project }}
39+
os: ${{ github.event.inputs.os }}
40+
dotnet_sdk_version: '6.0.200'
41+
secrets:
42+
token_repo: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)