From 8d3295bcade5aed85c1a5377c3babdae9fdcde35 Mon Sep 17 00:00:00 2001 From: Paul Mcilreavy Date: Wed, 7 Apr 2021 10:46:29 +1000 Subject: [PATCH] separate clean,build,test --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- .github/workflows/release.yml | 24 +++++++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e30ef..e8e9f3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,14 +40,30 @@ jobs: - name: get the code uses: actions/checkout@v2 - - name: restore, build and test - run: dotnet test + - name: clean + run: dotnet clean + --configuration ${{ env.CONFIGURATION }} + --nologo + ${{ env.SOLUTION_PATH }} + + - name: build + run: dotnet build --configuration ${{ env.CONFIGURATION }} --runtime ${{ matrix.runtime }} + --no-incremental --nologo /p:WarningLevel=4 /p:TreatWarningsAsErrors=true /p:NoWarn="" /p:WarningsAsErrors="" + ${{ env.SOLUTION_PATH }} + + - name: test + run: dotnet test + --configuration ${{ env.CONFIGURATION }} + --runtime ${{ matrix.runtime }} + --no-restore + --no-build + --nologo --filter "Category=unit|Category=integration" ${{ env.SOLUTION_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9218c2e..987a269 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,23 +44,41 @@ jobs: - name: get the code uses: actions/checkout@v2 - - name: build and test - run: dotnet test + - name: clean + run: dotnet clean + --configuration ${{ env.CONFIGURATION }} + --nologo + ${{ env.SOLUTION_PATH }} + + - name: build + run: dotnet build --configuration ${{ env.CONFIGURATION }} --runtime ${{ matrix.runtime }} + --no-incremental --nologo /p:WarningLevel=4 /p:TreatWarningsAsErrors=true /p:NoWarn="" /p:WarningsAsErrors="" + ${{ env.SOLUTION_PATH }} + + - name: test + run: dotnet test + --configuration ${{ env.CONFIGURATION }} + --runtime ${{ matrix.runtime }} + --no-restore + --no-build + --nologo --filter "Category=unit|Category=integration" ${{ env.SOLUTION_PATH }} - name: publish run: dotnet publish --configuration ${{ env.CONFIGURATION }} - --nologo --runtime ${{ matrix.runtime }} + --no-restore + --no-build + --nologo --self-contained true /p:BuildNumber=${{ env.BUILD_NUMBER }} /p:Version=${{ env.BUILD_NUMBER }}