From 84fe35070524dd41f42fb50d4f4459330ddd86a0 Mon Sep 17 00:00:00 2001 From: skibitsky Date: Tue, 12 Dec 2023 11:35:53 +0900 Subject: [PATCH] Move build into a separate job --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c1a93b..48a4a0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,35 +4,28 @@ on: push: branches: [ main, '2.0' ] pull_request: + jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - test-type: [unit-tests, integration-tests] - + steps: - uses: actions/checkout@v2 + - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: | 6.0.x - + - name: Restore dependencies run: dotnet restore working-directory: ./ - + - name: Build run: dotnet build --no-restore working-directory: ./ - - - name: Run tests - uses: ./.github/actions/ci - with: - type: ${{ matrix.test-type }} - project-id: ${{ secrets.PROJECT_ID }} - + - name: Upload build artifacts uses: actions/upload-artifact@v3 with: @@ -40,4 +33,26 @@ jobs: path: | **/bin/**/*.dll !**/Core Modules/**/bin/**/*.dll - !**/Tests/**/bin/**/*.dll \ No newline at end of file + !**/Tests/**/bin/**/*.dll + + test: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + test-type: [unit-tests, integration-tests] + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 6.0.x + + - name: Run tests + uses: ./.github/actions/ci + with: + type: ${{ matrix.test-type }} + project-id: ${{ secrets.PROJECT_ID }} \ No newline at end of file