From fd69fff8b920e1a9d87d3ef18b84f936862eb663 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Wed, 15 Apr 2026 21:41:46 +0000 Subject: [PATCH 01/17] Initial plan From 114d3fdf8f60621a0147e182ae29ea8e04950557 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Wed, 15 Apr 2026 21:46:40 +0000 Subject: [PATCH 02/17] ci: split backend and frontend lanes Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 61 +++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f39b1dfa..d9e4f448 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,22 +27,42 @@ jobs: - name: Dependency Review uses: actions/dependency-review-action@v4 - build: + openapi: + name: Generate OpenAPI document runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - - name: Enable pnpm with corepack - run: corepack enable pnpm + - name: Setup dotnet 10.x + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "10.0.x" - - name: Use Node.js 22.x - uses: actions/setup-node@v6 + - name: Install .NET Aspire workload + run: dotnet workload install aspire + + - name: Restore + run: dotnet restore MenuApi/MenuApi.csproj + + - name: Build API (generate OpenAPI) + run: dotnet build MenuApi/MenuApi.csproj --configuration Release --no-restore + + - name: Upload OpenAPI document + uses: actions/upload-artifact@v4 with: - node-version: 22.x - cache: 'pnpm' - cache-dependency-path: ui/menu-website/pnpm-lock.yaml + name: openapi-spec + path: open-api/menu-api.json + if-no-files-found: error + + backend: + name: Backend build and tests + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 - name: Setup dotnet 10.x uses: actions/setup-dotnet@v5 @@ -74,6 +94,31 @@ jobs: parameters__Auth0Domain: ${{ vars.AUTH0_DOMAIN }} parameters__Auth0Audience: http://localhost:65273 + frontend: + name: Frontend validation + runs-on: ubuntu-latest + needs: openapi + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Download OpenAPI document + uses: actions/download-artifact@v4 + with: + name: openapi-spec + path: . + + - name: Enable pnpm with corepack + run: corepack enable pnpm + + - name: Use Node.js 22.x + uses: actions/setup-node@v6 + with: + node-version: 22.x + cache: 'pnpm' + cache-dependency-path: ui/menu-website/pnpm-lock.yaml + - name: Install frontend dependencies run: pnpm install --frozen-lockfile working-directory: ./ui/menu-website From 631f69552fdec72a8845f51b26b8e370105d4416 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Wed, 15 Apr 2026 21:53:36 +0000 Subject: [PATCH 03/17] ci: flatten openapi artifact extraction Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9e4f448..39fcb9fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,6 +108,7 @@ jobs: with: name: openapi-spec path: . + merge-multiple: true - name: Enable pnpm with corepack run: corepack enable pnpm From 0e351fcf2364fbc6de8add14d1ed878cf6f32042 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Wed, 15 Apr 2026 22:03:52 +0000 Subject: [PATCH 04/17] ci: ensure openapi spec lands under open-api dir Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39fcb9fa..a91be1a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,7 +108,16 @@ jobs: with: name: openapi-spec path: . - merge-multiple: true + + - name: Place OpenAPI document + run: | + mkdir -p open-api + spec_path="$(find . -maxdepth 3 -name menu-api.json | head -n 1)" + if [ -z "$spec_path" ]; then + echo "menu-api.json not found in downloaded artifact" >&2 + exit 1 + fi + cp "$spec_path" open-api/menu-api.json - name: Enable pnpm with corepack run: corepack enable pnpm From cdb6381abe8f3d7e6a4e163aa886b87943e4ef81 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 22:08:04 +0000 Subject: [PATCH 05/17] ci: download openapi artifact into open-api directory Agent-Logs-Url: https://github.com/dgee2/Menu/sessions/9d8cc91e-aeca-4bfc-8164-38d5aca8f001 Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a91be1a8..8e0a2734 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -107,17 +107,7 @@ jobs: uses: actions/download-artifact@v4 with: name: openapi-spec - path: . - - - name: Place OpenAPI document - run: | - mkdir -p open-api - spec_path="$(find . -maxdepth 3 -name menu-api.json | head -n 1)" - if [ -z "$spec_path" ]; then - echo "menu-api.json not found in downloaded artifact" >&2 - exit 1 - fi - cp "$spec_path" open-api/menu-api.json + path: open-api - name: Enable pnpm with corepack run: corepack enable pnpm From 7523e5987c187ab6637cebab912c016eb7079fa3 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Wed, 15 Apr 2026 22:18:07 +0000 Subject: [PATCH 06/17] chore(ci): consolidate build artifact flow Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 66 ++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e0a2734..adfcd4e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,9 @@ on: pull_request: branches: ["dev", "master", "main"] +permissions: + contents: read + # Based from https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-net jobs: dependency-review: @@ -27,9 +30,12 @@ jobs: - name: Dependency Review uses: actions/dependency-review-action@v4 - openapi: - name: Generate OpenAPI document + backend-build: + name: Backend build (OpenAPI artifact) runs-on: ubuntu-latest + permissions: + contents: read + actions: write steps: - name: Checkout @@ -44,10 +50,10 @@ jobs: run: dotnet workload install aspire - name: Restore - run: dotnet restore MenuApi/MenuApi.csproj + run: dotnet restore MenuApi.sln - - name: Build API (generate OpenAPI) - run: dotnet build MenuApi/MenuApi.csproj --configuration Release --no-restore + - name: Build solution (generate OpenAPI) + run: dotnet build MenuApi.sln --configuration Release --no-restore - name: Upload OpenAPI document uses: actions/upload-artifact@v4 @@ -56,9 +62,36 @@ jobs: path: open-api/menu-api.json if-no-files-found: error - backend: - name: Backend build and tests + - name: Upload backend build outputs + uses: actions/upload-artifact@v4 + with: + name: backend-build-output + path: | + Menu.ApiServiceDefaults/bin/Release/ + Menu.ApiServiceDefaults/obj/Release/ + Menu.AppHost/bin/Release/ + Menu.AppHost/obj/Release/ + Menu.MigrationService/bin/Release/ + Menu.MigrationService/obj/Release/ + Menu.ServiceDefaults/bin/Release/ + Menu.ServiceDefaults/obj/Release/ + MenuApi/bin/Release/ + MenuApi/obj/Release/ + MenuApi.Tests/bin/Release/ + MenuApi.Tests/obj/Release/ + MenuApi.Integration.Tests/bin/Release/ + MenuApi.Integration.Tests/obj/Release/ + MenuDB/bin/Release/ + MenuDB/obj/Release/ + if-no-files-found: error + + backend-tests: + name: Backend tests runs-on: ubuntu-latest + needs: backend-build + permissions: + contents: read + actions: read steps: - name: Checkout @@ -72,11 +105,12 @@ jobs: - name: Install .NET Aspire workload run: dotnet workload install aspire - - name: Install dependencies - run: dotnet restore - - - name: Build - run: dotnet build --configuration Release --no-restore + - name: Download backend build outputs + uses: actions/download-artifact@v4 + with: + name: backend-build-output + path: . + merge-multiple: true - name: clean ssl cert run: dotnet dev-certs https --clean @@ -87,7 +121,7 @@ jobs: echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" - name: Test with the dotnet CLI - run: dotnet test --configuration Release --no-build --no-restore + run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build --no-restore env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} @@ -97,7 +131,10 @@ jobs: frontend: name: Frontend validation runs-on: ubuntu-latest - needs: openapi + needs: backend-build + permissions: + contents: read + actions: read steps: - name: Checkout @@ -108,6 +145,7 @@ jobs: with: name: openapi-spec path: open-api + merge-multiple: true - name: Enable pnpm with corepack run: corepack enable pnpm From 55207a9d34def909a591455fe3dbc1e8e4045036 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:22:08 +0000 Subject: [PATCH 07/17] fix(ci): remove unsupported --project flag from dotnet test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The --project flag is not supported by dotnet test. Use path argument directly. This fixes the build failure in PR #989 where the backend tests job was failing with: "Get projects properties with MSBuild didn't execute properly with exit code: 1" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index adfcd4e9..63ae8a13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,7 +121,7 @@ jobs: echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" - name: Test with the dotnet CLI - run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build --no-restore + run: dotnet test MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build --no-restore env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} From ac0cb5a1459d6cbd0085af8b05c9de558a23a25b Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:30:17 +0000 Subject: [PATCH 08/17] Add restore step before running tests on downloaded artifacts The backend-tests job downloads pre-built artifacts but still needs NuGet package dependencies restored before running tests with --no-build. This fixes the error where dotnet test couldn't locate required dependencies. Co-authored-by: dgee2 <5671841+dgee2@users.noreply.github.com> --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 63ae8a13..5d0da024 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -120,8 +120,11 @@ jobs: dotnet dev-certs https --trust || true echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" + - name: Restore test project + run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj + - name: Test with the dotnet CLI - run: dotnet test MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build --no-restore + run: dotnet test MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} From e682528362982f2694e57bf461d7f129a2e17848 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:08:17 +0100 Subject: [PATCH 09/17] Apply suggestion from @dgee2 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d0da024..158802d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -124,7 +124,7 @@ jobs: run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj - name: Test with the dotnet CLI - run: dotnet test MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build + run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} From 466f93fdd1fd7a864bc3af6f201dfd93f388d060 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:11:41 +0100 Subject: [PATCH 10/17] Apply suggestion from @dgee2 --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 158802d9..9bc7842b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -123,6 +123,9 @@ jobs: - name: Restore test project run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj +- name: Fix executable permissions + run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests + - name: Test with the dotnet CLI run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build env: From 98b6c612c730f044030d2ed524024903247968f5 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:12:54 +0100 Subject: [PATCH 11/17] Apply suggestion from @dgee2 --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9bc7842b..09ccaf3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -124,7 +124,8 @@ jobs: run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj - name: Fix executable permissions - run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests + - name: Fix executable permissions + run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests - name: Test with the dotnet CLI run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build From 57f039fe3dae648496360096efaaa55f9489ff6f Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:22:21 +0100 Subject: [PATCH 12/17] feat(ci): add frontend validation steps and update test project configuration --- .github/workflows/main.yml | 42 +++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09ccaf3b..a1b526f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,6 +93,43 @@ jobs: contents: read actions: read + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup dotnet 10.x + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "10.0.x" + + - name: Install .NET Aspire workload + run: dotnet workload install aspire + + - name: Download backend build outputs + uses: actions/download-artifact@v4 + with: + name: backend-build-output + path: . + merge-multiple: true + + - name: Restore test project + run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj + + - name: Fix executable permissions + run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests + + - name: Test with the dotnet CLI + run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build + + + backend-integration-tests: + name: Backend integration tests + runs-on: ubuntu-latest + needs: backend-build + permissions: + contents: read + actions: read + steps: - name: Checkout uses: actions/checkout@v6 @@ -123,12 +160,11 @@ jobs: - name: Restore test project run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj -- name: Fix executable permissions - name: Fix executable permissions - run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests + run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Integration.Tests - name: Test with the dotnet CLI - run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build + run: dotnet test --project MenuApi.Tests/MenuApi.Integration.Tests.csproj --configuration Release --no-build env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} From fb616fc09a436b2d7cdaf8b23a1ea74b06dffa13 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:24:52 +0100 Subject: [PATCH 13/17] fix(ci): update restore step to target the correct test project --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1b526f7..1c30cabc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -158,7 +158,7 @@ jobs: echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" - name: Restore test project - run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj + run: dotnet restore MenuApi.Tests/MenuApi.Integration.Tests.csproj - name: Fix executable permissions run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Integration.Tests From 00a7a4bfa1a6a048e2dbc6abd335ff712760cc8d Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:27:21 +0100 Subject: [PATCH 14/17] fix(ci): correct paths for restoring and testing integration project --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c30cabc..c2b75942 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -158,13 +158,13 @@ jobs: echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" - name: Restore test project - run: dotnet restore MenuApi.Tests/MenuApi.Integration.Tests.csproj + run: dotnet restore MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj - name: Fix executable permissions - run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Integration.Tests + run: chmod +x MenuApi.Integration.Tests/bin/Release/net10.0/MenuApi.Integration.Tests - name: Test with the dotnet CLI - run: dotnet test --project MenuApi.Tests/MenuApi.Integration.Tests.csproj --configuration Release --no-build + run: dotnet test --project MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj --configuration Release --no-build env: parameters__Auth0TestClientId: ${{ vars.AUTH0_CLIENT_ID }} parameters__Auth0TestClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }} From 753c304abe05716f8ca786d481aa55b4a4bcb71b Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:32:56 +0100 Subject: [PATCH 15/17] fix(ci): update executable permissions for integration tests and related services --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c2b75942..d2223ae6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -161,7 +161,10 @@ jobs: run: dotnet restore MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj - name: Fix executable permissions - run: chmod +x MenuApi.Integration.Tests/bin/Release/net10.0/MenuApi.Integration.Tests + run: + chmod +x MenuApi.Integration.Tests/bin/Release/net10.0/MenuApi.Integration.Tests + chmod +x Menu.MigrationService/bin/Release/net10.0/Menu.MigrationService + chmod +x Menu.AppHost/bin/Release/net10.0/Menu.AppHost - name: Test with the dotnet CLI run: dotnet test --project MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj --configuration Release --no-build From 47fcb10b72d47631a17bcee6ffc9c59abb2b88a7 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:35:46 +0100 Subject: [PATCH 16/17] fix(ci): update executable permissions for integration tests --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2223ae6..faa241c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -161,7 +161,7 @@ jobs: run: dotnet restore MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj - name: Fix executable permissions - run: + run: | chmod +x MenuApi.Integration.Tests/bin/Release/net10.0/MenuApi.Integration.Tests chmod +x Menu.MigrationService/bin/Release/net10.0/Menu.MigrationService chmod +x Menu.AppHost/bin/Release/net10.0/Menu.AppHost From b84b9463ac44b522e3e3f3544b874a11a50cf339 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Mon, 20 Apr 2026 08:46:56 +0100 Subject: [PATCH 17/17] refactor(ci): streamline backend build and test steps, remove unnecessary artifact uploads --- .github/workflows/main.yml | 62 ++++++-------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index faa241c6..0f35f0ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: uses: actions/dependency-review-action@v4 backend-build: - name: Backend build (OpenAPI artifact) + name: Create OpenAPI spec runs-on: ubuntu-latest permissions: contents: read @@ -62,33 +62,9 @@ jobs: path: open-api/menu-api.json if-no-files-found: error - - name: Upload backend build outputs - uses: actions/upload-artifact@v4 - with: - name: backend-build-output - path: | - Menu.ApiServiceDefaults/bin/Release/ - Menu.ApiServiceDefaults/obj/Release/ - Menu.AppHost/bin/Release/ - Menu.AppHost/obj/Release/ - Menu.MigrationService/bin/Release/ - Menu.MigrationService/obj/Release/ - Menu.ServiceDefaults/bin/Release/ - Menu.ServiceDefaults/obj/Release/ - MenuApi/bin/Release/ - MenuApi/obj/Release/ - MenuApi.Tests/bin/Release/ - MenuApi.Tests/obj/Release/ - MenuApi.Integration.Tests/bin/Release/ - MenuApi.Integration.Tests/obj/Release/ - MenuDB/bin/Release/ - MenuDB/obj/Release/ - if-no-files-found: error - backend-tests: name: Backend tests runs-on: ubuntu-latest - needs: backend-build permissions: contents: read actions: read @@ -105,18 +81,11 @@ jobs: - name: Install .NET Aspire workload run: dotnet workload install aspire - - name: Download backend build outputs - uses: actions/download-artifact@v4 - with: - name: backend-build-output - path: . - merge-multiple: true - - - name: Restore test project - run: dotnet restore MenuApi.Tests/MenuApi.Tests.csproj + - name: Restore + run: dotnet restore MenuApi.sln - - name: Fix executable permissions - run: chmod +x MenuApi.Tests/bin/Release/net10.0/MenuApi.Tests + - name: Build solution (generate OpenAPI) + run: dotnet build MenuApi.sln --configuration Release --no-restore - name: Test with the dotnet CLI run: dotnet test --project MenuApi.Tests/MenuApi.Tests.csproj --configuration Release --no-build @@ -125,7 +94,6 @@ jobs: backend-integration-tests: name: Backend integration tests runs-on: ubuntu-latest - needs: backend-build permissions: contents: read actions: read @@ -142,12 +110,11 @@ jobs: - name: Install .NET Aspire workload run: dotnet workload install aspire - - name: Download backend build outputs - uses: actions/download-artifact@v4 - with: - name: backend-build-output - path: . - merge-multiple: true + - name: Restore + run: dotnet restore MenuApi.sln + + - name: Build solution (generate OpenAPI) + run: dotnet build MenuApi.sln --configuration Release --no-restore - name: clean ssl cert run: dotnet dev-certs https --clean @@ -157,15 +124,6 @@ jobs: dotnet dev-certs https --trust || true echo "SSL_CERT_DIR=$HOME/.aspnet/dev-certs/trust:${SSL_CERT_DIR:-/usr/lib/ssl/certs}" >> "$GITHUB_ENV" - - name: Restore test project - run: dotnet restore MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj - - - name: Fix executable permissions - run: | - chmod +x MenuApi.Integration.Tests/bin/Release/net10.0/MenuApi.Integration.Tests - chmod +x Menu.MigrationService/bin/Release/net10.0/Menu.MigrationService - chmod +x Menu.AppHost/bin/Release/net10.0/Menu.AppHost - - name: Test with the dotnet CLI run: dotnet test --project MenuApi.Integration.Tests/MenuApi.Integration.Tests.csproj --configuration Release --no-build env: