diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b1de82..dc4d87e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,59 +2,67 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: - build: runs-on: windows-latest steps: + # Prepare - # Prepare - - - name: Installing .NET Core 2.1... + - name: Install .NET Core 2.1 uses: actions/setup-dotnet@v1 with: - dotnet-version: 2.1.x + dotnet-version: 2.1.x - - name: Installing .NET Core 3.1... + - name: Install .NET Core 3.1 uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x - - - name: Installing .NET 5.0... + dotnet-version: 3.1.x + + - name: Install .NET 5.0 uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.x + dotnet-version: 5.0.x - - name: Getting sources... + - name: Install Stryker + run: dotnet tool install --global dotnet-stryker + + - name: Get sources uses: actions/checkout@v2 - - name: Restoring packages... - run: dotnet restore + # Build and Test + - name: Restore packages + run: dotnet restore - # Build and Test (Debug) + - name: Build Debug + run: dotnet build --configuration Debug - - name: Building Debug... - run: dotnet build --configuration Debug --no-incremental + - name: Run tests + run: dotnet test --no-build --collect "Code Coverage" - - name: Running tests... - run: dotnet test --no-build + # Run Mutation Tests + - name: Run mutation tests + run: dotnet stryker - # Build and Publish (Release) + - name: Upload Stryker Output + uses: actions/upload-artifact@v2 + with: + name: mutation-tests + path: "**/mutation-report.html" + if-no-files-found: error - - name: Cleaning up... - run: git clean -d -x -f + # Build and Publish (Release) - - name: Building Release... - run: dotnet build --configuration Release --no-incremental + - name: Build Release + run: dotnet build --configuration Release - - name: Uploading NuGet package... + - name: Upload NuGet package uses: actions/upload-artifact@v2 with: name: nuget