From bc5c7978fb924feaa0a1f6da444bb9cfcd35a135 Mon Sep 17 00:00:00 2001 From: jing Date: Sun, 22 Feb 2026 20:13:55 +0100 Subject: [PATCH] Update CI/CD workflows for improved build and test processes Co-authored-by: GPT-5.1 --- .github/workflows/build_and_test.yml | 24 +++++++++++----------- .github/workflows/continous-deployment.yml | 14 +++---------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8bcea52..0fd6434 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,18 +1,18 @@ -name: .NET Build and Test (CI) +name: .NET Build and Test permissions: contents: write pull-requests: write on: - push: - branches: - - main - tags: - - "v*.*.*" - pull_request: - branches: - - main + push: + branches: + - main + tags: + - "v*.*.*" + pull_request: + branches: + - main jobs: build: @@ -29,10 +29,10 @@ jobs: run: dotnet restore - name: Build project - run: dotnet build --no-restore + run: dotnet build --no-restore -c Release - - name: Tests + - name: Tests (infrastructure only) run: | export Authentication_Github_ClientId="${{ secrets.GITHUBCLIENTID }}" export Authentication_Github_ClientSecret="${{ secrets.GITHUBCLIENTSECRET }}" - dotnet test test/Chirp.Infrastructure.Test/Chirp.Infrastructure.Test.csproj --no-build --verbosity normal + dotnet test test/Chirp.Infrastructure.Test/Chirp.Infrastructure.Test.csproj --no-build -c Release --verbosity normal diff --git a/.github/workflows/continous-deployment.yml b/.github/workflows/continous-deployment.yml index 11bad83..8f7761c 100644 --- a/.github/workflows/continous-deployment.yml +++ b/.github/workflows/continous-deployment.yml @@ -7,6 +7,9 @@ on: branches: - main - master + pull_request: + branches: + - main # allow manual triggers for now too workflow_dispatch: @@ -29,17 +32,6 @@ jobs: - name: Build project run: dotnet build --no-restore - - name: Install Playwright - run: | - dotnet tool install --global Microsoft.Playwright.CLI || true - playwright install --with-deps - - - name: Tests - run: | - export Authentication_Github_ClientId="${{ secrets.GITHUBCLIENTID }}" - export Authentication_Github_ClientSecret="${{ secrets.GITHUBCLIENTSECRET }}" - dotnet test --no-build -c Release --verbosity normal - deploy: needs: build runs-on: ubuntu-latest