From 84228a5998dccc42db9a3da4bf7a9c35955e57b1 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 21:44:11 +0200 Subject: [PATCH 01/11] :alembic: test new reusable workflow --- .github/workflows/pipelines.yml | 51 +++++++-------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 01a3fd43..253b5e67 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -23,46 +23,17 @@ permissions: jobs: prepare_linux: - name: 🐧 Prepare Linux - runs-on: ubuntu-24.04 - timeout-minutes: 15 - outputs: - restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }} - steps: - - name: Checkout - uses: codebeltnet/git-checkout@v1 - - - name: Install .NET - uses: codebeltnet/install-dotnet@v1 - with: - includePreview: true - - - id: dotnet-restore - name: Restore Dependencies - uses: codebeltnet/dotnet-restore@v2 - with: - useRestoreCache: true + name: call-restore-linux + uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 + with: + use-restore-cache: true prepare_windows: - name: 🪟 Prepare Windows - runs-on: windows-2022 - timeout-minutes: 15 - outputs: - restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }} - steps: - - name: Checkout - uses: codebeltnet/git-checkout@v1 - - - name: Install .NET - uses: codebeltnet/install-dotnet@v1 - with: - includePreview: true - - - id: dotnet-restore - name: Restore Dependencies - uses: codebeltnet/dotnet-restore@v2 - with: - useRestoreCache: true + name: call-restore-windows + uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 + with: + use-restore-cache: true + runs-on: windows-2022 prepare_test: name: 📜 Prepare Test @@ -127,7 +98,7 @@ jobs: runs-on: ${{ matrix.os }} configuration: ${{ matrix.configuration }} projects: ${{ matrix.project }} - restore-cache-key: ${{ matrix.os == 'ubuntu-24.04' && needs.prepare_linux.outputs.restoreCacheKey || needs.prepare_windows.outputs.restoreCacheKey }} + restore-cache-key: ${{ matrix.os == 'ubuntu-24.04' && needs.prepare_linux.outputs.restore-cache-key || needs.prepare_windows.outputs.restore-cache-key }} test-arguments: -- RunConfiguration.DisableAppDomain=true integration_test: @@ -202,7 +173,7 @@ jobs: deploy: if: github.event_name != 'pull_request' name: call-nuget - needs: [build,pack,test,sonarcloud,codecov,codeql] + needs: [build, pack, test, integration_test, sonarcloud, codecov, codeql] uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v1 with: version: ${{ needs.build.outputs.version }} From 6815b023c9c0a2d11316b996ca2014a437320399 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 22:00:57 +0200 Subject: [PATCH 02/11] fix --- .github/workflows/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 253b5e67..5fe150fb 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -65,7 +65,7 @@ jobs: uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v1 with: configuration: ${{ matrix.configuration }} - restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} + restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} strong-name-key-filename: cuemon.snk secrets: GCP_TOKEN: ${{ secrets.GCP_TOKEN }} @@ -82,7 +82,7 @@ jobs: configuration: ${{ matrix.configuration }} upload-packed-artifact: true version: ${{ needs.build.outputs.version }} - restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} + restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} test: name: call-test From df7f0ac3824e08d5b2fce668b0f99f6b9e60411c Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 22:03:46 +0200 Subject: [PATCH 03/11] bump build and pack --- .github/workflows/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 5fe150fb..824a8136 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: configuration: [Debug, Release] - uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v1 + uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v2 with: configuration: ${{ matrix.configuration }} restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} @@ -77,7 +77,7 @@ jobs: strategy: matrix: configuration: [Debug, Release] - uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v1 + uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v2 with: configuration: ${{ matrix.configuration }} upload-packed-artifact: true From 0252f0d7c33bd1e1c8455d90d82ea4abf72d6e23 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 22:04:54 +0200 Subject: [PATCH 04/11] fix --- .github/workflows/pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 824a8136..7edcaa5b 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -80,7 +80,6 @@ jobs: uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v2 with: configuration: ${{ matrix.configuration }} - upload-packed-artifact: true version: ${{ needs.build.outputs.version }} restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} From c1569422f3a626eb5984db7e9995b78667559fc2 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 23:04:08 +0200 Subject: [PATCH 05/11] v2 of reusable workflow for test --- .github/workflows/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 7edcaa5b..d8da43fc 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -92,7 +92,7 @@ jobs: os: [ubuntu-24.04, windows-2022] configuration: [Debug, Release] project: ${{ fromJson(needs.prepare_test.outputs.json) }} - uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v1 + uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2 with: runs-on: ${{ matrix.os }} configuration: ${{ matrix.configuration }} From f59eb021175c15a39d8858b048cff452c6840fe3 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 23:15:15 +0200 Subject: [PATCH 06/11] fix --- .github/workflows/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index d8da43fc..b4846a0b 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -129,11 +129,11 @@ jobs: SA_PASSWORD: ${{ secrets.SA_PASSWORD }} - name: Test with ${{ matrix.configuration }} build - uses: codebeltnet/dotnet-test@v3 + uses: codebeltnet/dotnet-test@v4 with: projects: ${{ matrix.project }} configuration: ${{ matrix.configuration }} - restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }} + restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} env: CONNECTIONSTRINGS__ADVENTUREWORKS: ${{ secrets.DB_ADVENTUREWORKS }} From 78b82dbc56e2b622c9266f0b2a4a72275601de88 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 23:23:36 +0200 Subject: [PATCH 07/11] fix --- .github/workflows/pipelines.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index b4846a0b..1d99b8aa 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -128,12 +128,24 @@ jobs: env: SA_PASSWORD: ${{ secrets.SA_PASSWORD }} + - name: Restore Cache + uses: actions/cache/restore@v4 + with: + path: | + ${{ github.workspace }} + !${{ github.workspace }}/.git + ~/.nuget/packages + key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} + restore-keys: | + dotnet-restore- + enableCrossOsArchive: true + fail-on-cache-miss: true + - name: Test with ${{ matrix.configuration }} build uses: codebeltnet/dotnet-test@v4 with: projects: ${{ matrix.project }} configuration: ${{ matrix.configuration }} - restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} env: CONNECTIONSTRINGS__ADVENTUREWORKS: ${{ secrets.DB_ADVENTUREWORKS }} From 18584932dcacb045f8fc1653ff390fd03a7cf148 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Thu, 29 May 2025 23:33:19 +0200 Subject: [PATCH 08/11] fix --- .github/workflows/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 1d99b8aa..8cb98d4c 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -135,7 +135,7 @@ jobs: ${{ github.workspace }} !${{ github.workspace }}/.git ~/.nuget/packages - key: ${{ needs.prepare_linux.outputs.restoreCacheKey }} + key: ${{ needs.prepare_linux.outputs.restore-cache-key }} restore-keys: | dotnet-restore- enableCrossOsArchive: true From 4c22fa822dbcc0ca10a221f65113a3294aa2fa79 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Fri, 30 May 2025 01:23:59 +0200 Subject: [PATCH 09/11] fix --- .github/workflows/pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 8cb98d4c..d8fb2636 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -141,6 +141,12 @@ jobs: enableCrossOsArchive: true fail-on-cache-miss: true + - name: Download Build Artifacts + uses: actions/download-artifact@v4 + with: + pattern: '*-${{ matrix.configuration }}' + merge-multiple: true + - name: Test with ${{ matrix.configuration }} build uses: codebeltnet/dotnet-test@v4 with: From a1b2f76ba9b2b138e167724e4b55ffb995b847a1 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Fri, 30 May 2025 01:26:22 +0200 Subject: [PATCH 10/11] exp --- .github/workflows/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index d8fb2636..27411b39 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -23,7 +23,7 @@ permissions: jobs: prepare_linux: - name: call-restore-linux + name: 🐧 Prepare Linux uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 with: use-restore-cache: true From 6e77d8469b4cbb0d69fd680c90b23eb6f9273dc7 Mon Sep 17 00:00:00 2001 From: Michael Mortensen Date: Wed, 11 Jun 2025 23:07:27 +0200 Subject: [PATCH 11/11] tweaks --- .github/workflows/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 27411b39..2ab791ae 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -29,7 +29,7 @@ jobs: use-restore-cache: true prepare_windows: - name: call-restore-windows + name: 🪟 Prepare Windows uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 with: use-restore-cache: true