support distinct #61
This file contains hidden or 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: build | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 01 Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: 02 Setup .NET Core | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 6.0.100 | |
| - name: 03 Restore Dotnet Tool | |
| run: dotnet tool restore | |
| - name: 04 Check Code Format | |
| run: dotnet format --verify-no-changes | |
| - name: 05 Build with dotnet | |
| run: dotnet build | |
| - name: 06 Count Test Projects | |
| run: echo TEST_PROJ_COUNT=$(ls -l test |grep "^d"|wc -l) >> $GITHUB_ENV | |
| - name: 07 Run Unit test | |
| if: env.TEST_PROJ_COUNT>0 | |
| run: dotnet test --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude="[*Test]*" |