add check functionality #8
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: DotNet Build and Run | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore src | |
| - name: Build solution | |
| run: dotnet build src --configuration Release --no-restore | |
| - name: Run tests | |
| run: dotnet test src --no-restore --verbosity normal | |
| - name: Pack application | |
| run: dotnet pack src | |
| - name: Publish application | |
| run: dotnet publish src --configuration Release --output ./publish |