Invalidation cache #22
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
name: Main pipeline | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core if needed | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Set execute permission for build.sh | |
run: chmod +x ./build.sh | |
- name: Restore | |
run: dotnet tool restore | |
- name: Build | |
run: ./build.sh --target Compile --configuration Release | |
- name: Test | |
run: ./build.sh --target Test --configuration Release | |
- name: Upload test results to GitHub | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
path: '**/TestResults/*.trx' | |
name: 'Unit Tests' | |
reporter: 'dotnet-trx' | |
fail-on-error: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Stryker | |
run: ./build.sh --target MutationTest --configuration Release | |
- name: Upload Stryker Results as Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: stryker-results | |
path: '**/StrykerOutput/**/*.html' | |
deploy-to-nuget: | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core if needed | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Set execute permission for build.sh | |
run: chmod +x ./build.sh | |
- name: Build | |
run: ./build.sh --target Compile --configuration Release | |
- name: Publish | |
run: ./build.sh --target Pack --configuration Release | |
- name: Publish to NuGet | |
run: ./build.sh --target Push --configuration Release --nuget-api-key ${{ secrets.NUGET_API_KEY }} |