From 3aa3344e78d2dd1b511ff08d42a497add0cd9014 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 15:44:06 -0500 Subject: [PATCH 01/10] Updated gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 53a6d75..00d7d01 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /src/NodeDev.Blazor.MAUI/bin/Debug/net9.0-windows10.0.19041.0/win10-x64 /src/NodeDev.Blazor.MAUI/obj /src/NodeDev.Blazor.MAUI/bin/Release/net9.0-windows10.0.19041.0/win-x64 +/src/NodeDev.Blazor.Server/AppOptions.json From 1e6dc3f54b5021dadad125c344ce35427eb75c1e Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 16:30:44 -0500 Subject: [PATCH 02/10] Changed CI to use reusable workflow --- .github/workflows/dotnet.yml | 86 +----------------------- .github/workflows/release.yml | 86 +----------------------- .github/workflows/workflow-build.yml | 33 +++++++++ .github/workflows/workflow-e2e-tests.yml | 44 ++++++++++++ .github/workflows/workflow-tests.yml | 24 +++++++ 5 files changed, 107 insertions(+), 166 deletions(-) create mode 100644 .github/workflows/workflow-build.yml create mode 100644 .github/workflows/workflow-e2e-tests.yml create mode 100644 .github/workflows/workflow-tests.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7839225..064b77b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,90 +11,10 @@ on: jobs: build: - name: Builds the entire solution - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - name: Restore .NET dependencies - working-directory: ./src - run: dotnet restore - - - name: Build - working-directory: ./src - run: dotnet build --no-restore - - - name: Upload Build Artifact - uses: actions/upload-artifact@v4 - with: - name: buildArtifact - path: ./src - retention-days: 7 + uses: ./.github/workflows/workflow-build.yml tests: - name: Run Unit Tests - runs-on: ubuntu-latest - needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@v4 - with: - name: buildArtifact - path: ./src - - - name: Test - working-directory: ./src/NodeDev.Tests - run: dotnet test --no-build --verbosity normal + uses: ./.github/workflows/workflow-tests.yml e2e-tests: - name: Run End To End Tests - runs-on: ubuntu-latest - needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@master - with: - name: buildArtifact - path: ./src - - - name: Build Necessary for Playwright - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet build - - - name: Allow run - run: chmod -R +x ./src/NodeDev.Blazor.Server/bin - - - name: Ensure browsers are installed - run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps - - - name: Test - env: - HEADLESS: true - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet test --no-build --verbosity normal - - - name: Upload std Artifact - if: failure() - uses: actions/upload-artifact@v4 - with: - name: logServer - path: ./src/NodeDev.Blazor.Server/logs - retention-days: 7 + uses: ./.github/workflows/workflow-e2e-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf9723e..4c07c5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,93 +12,13 @@ permissions: jobs: build: - name: Build the entire solution - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - name: Restore .NET dependencies - working-directory: ./src - run: dotnet restore - - - name: Build - working-directory: ./src - run: dotnet build --no-restore - - - name: Upload Build Artifact - uses: actions/upload-artifact@v4 - with: - name: buildArtifact - path: ./src - retention-days: 7 + uses: ./.github/workflows/workflow-build.yml tests: - name: Run Unit Tests - runs-on: ubuntu-latest - needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@v4 - with: - name: buildArtifact - path: ./src - - - name: Test - working-directory: ./src/NodeDev.Tests - run: dotnet test --no-build --verbosity normal + uses: ./.github/workflows/workflow-tests.yml e2e-tests: - name: Run End To End Tests - runs-on: ubuntu-latest - needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@master - with: - name: buildArtifact - path: ./src - - - name: Build Necessary for Playwright - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet build - - - name: Allow run - run: chmod -R +x ./src/NodeDev.Blazor.Server/bin - - - name: Ensure browsers are installed - run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps - - - name: Test - env: - HEADLESS: true - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet test --no-build --verbosity normal - - - name: Upload std Artifact - if: failure() - uses: actions/upload-artifact@v4 - with: - name: logServer - path: ./src/NodeDev.Blazor.Server/logs - retention-days: 7 + uses: ./.github/workflows/workflow-e2e-tests.yml publish: name: Publish and package diff --git a/.github/workflows/workflow-build.yml b/.github/workflows/workflow-build.yml new file mode 100644 index 0000000..c1808dd --- /dev/null +++ b/.github/workflows/workflow-build.yml @@ -0,0 +1,33 @@ +name: .Build the entire solution + +on: + workflow_call: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Restore .NET dependencies + working-directory: ./src + run: dotnet restore + + - name: Build + working-directory: ./src + run: dotnet build --no-restore + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: buildArtifact + path: ./src + retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml new file mode 100644 index 0000000..91c96f8 --- /dev/null +++ b/.github/workflows/workflow-e2e-tests.yml @@ -0,0 +1,44 @@ +name: Run End To End Tests + +on: + workflow_call: + +jobs: + e2e-tests: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - uses: actions/download-artifact@master + with: + name: buildArtifact + path: ./src + + - name: Build Necessary for Playwright + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet build + + - name: Allow run + run: chmod -R +x ./src/NodeDev.Blazor.Server/bin + + - name: Ensure browsers are installed + run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps + + - name: Test + env: + HEADLESS: true + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet test --no-build --verbosity normal + + - name: Upload std Artifact + if: failure() + uses: actions/upload-artifact@v4 + with: + name: logServer + path: ./src/NodeDev.Blazor.Server/logs + retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml new file mode 100644 index 0000000..01a47ab --- /dev/null +++ b/.github/workflows/workflow-tests.yml @@ -0,0 +1,24 @@ +name: .Run Unit Tests + +on: + workflow_call: + +jobs: + tests: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - uses: actions/download-artifact@v4 + with: + name: buildArtifact + path: ./src + + - name: Test + working-directory: ./src/NodeDev.Tests + run: dotnet test --no-build --verbosity normal \ No newline at end of file From fc049a962298a6fa004a89b1e99a3ab06ccd4eef Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 16:50:50 -0500 Subject: [PATCH 03/10] Combined build and test since with need to build before testing --- .github/workflows/dotnet.yml | 9 +- .github/workflows/release.yml | 10 +- .../workflows/workflow-build-and-tests.yml | 93 +++++++++++++++++++ 3 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/workflow-build-and-tests.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 064b77b..7de5a54 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,11 +10,6 @@ on: branches: [ "master" ] jobs: - build: - uses: ./.github/workflows/workflow-build.yml - - tests: - uses: ./.github/workflows/workflow-tests.yml + build-and-test: + uses: ./.github/workflows/workflow-build-and-test.yml - e2e-tests: - uses: ./.github/workflows/workflow-e2e-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c07c5c..da2c24a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,14 +11,8 @@ permissions: contents: write jobs: - build: - uses: ./.github/workflows/workflow-build.yml - - tests: - uses: ./.github/workflows/workflow-tests.yml - - e2e-tests: - uses: ./.github/workflows/workflow-e2e-tests.yml + build-and-test: + uses: ./.github/workflows/workflow-build-and-test.yml publish: name: Publish and package diff --git a/.github/workflows/workflow-build-and-tests.yml b/.github/workflows/workflow-build-and-tests.yml new file mode 100644 index 0000000..3e2cca7 --- /dev/null +++ b/.github/workflows/workflow-build-and-tests.yml @@ -0,0 +1,93 @@ +name: .Build and Tests + +on: + workflow_call: + +jobs: + build: + name: .Build the entire solution + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Restore .NET dependencies + working-directory: ./src + run: dotnet restore + + - name: Build + working-directory: ./src + run: dotnet build --no-restore + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: buildArtifact + path: ./src + retention-days: 7 + + tests: + name: .Run Unit Tests + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - uses: actions/download-artifact@v4 + with: + name: buildArtifact + path: ./src + + - name: Test + working-directory: ./src/NodeDev.Tests + run: dotnet test --no-build --verbosity normal + + e2e-tests: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - uses: actions/download-artifact@master + with: + name: buildArtifact + path: ./src + + - name: Build Necessary for Playwright + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet build + + - name: Allow run + run: chmod -R +x ./src/NodeDev.Blazor.Server/bin + + - name: Ensure browsers are installed + run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps + + - name: Test + env: + HEADLESS: true + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet test --no-build --verbosity normal + + - name: Upload std Artifact + if: failure() + uses: actions/upload-artifact@v4 + with: + name: logServer + path: ./src/NodeDev.Blazor.Server/logs + retention-days: 7 \ No newline at end of file From 0b187b5f3b0bcb1fb9054bc71c5dd2a5e7db4876 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 16:53:11 -0500 Subject: [PATCH 04/10] Typo --- .github/workflows/dotnet.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7de5a54..a21a68d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,5 +11,5 @@ on: jobs: build-and-test: - uses: ./.github/workflows/workflow-build-and-test.yml + uses: ./.github/workflows/workflow-build-and-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da2c24a..60fd8d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ permissions: jobs: build-and-test: - uses: ./.github/workflows/workflow-build-and-test.yml + uses: ./.github/workflows/workflow-build-and-tests.yml publish: name: Publish and package From 05767dcc2217fc9dce281a7daf0b3f58137eae98 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 17:02:50 -0500 Subject: [PATCH 05/10] Tried to split more the files --- .github/workflows/dotnet.yml | 2 +- .github/workflows/release.yml | 4 +- .../workflows/workflow-build-and-tests.yml | 83 +------------------ .github/workflows/workflow-e2e-tests.yml | 1 - .github/workflows/workflow-tests.yml | 1 - 5 files changed, 6 insertions(+), 85 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a21a68d..d2a113b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,6 +10,6 @@ on: branches: [ "master" ] jobs: - build-and-test: + build: uses: ./.github/workflows/workflow-build-and-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60fd8d0..ab9d875 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,13 +11,13 @@ permissions: contents: write jobs: - build-and-test: + build-and-tests: uses: ./.github/workflows/workflow-build-and-tests.yml publish: name: Publish and package runs-on: windows-latest - needs: [build, tests, e2e-tests] + needs: [build-and-tests] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workflow-build-and-tests.yml b/.github/workflows/workflow-build-and-tests.yml index 3e2cca7..91752b8 100644 --- a/.github/workflows/workflow-build-and-tests.yml +++ b/.github/workflows/workflow-build-and-tests.yml @@ -5,89 +5,12 @@ on: jobs: build: - name: .Build the entire solution - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - name: Restore .NET dependencies - working-directory: ./src - run: dotnet restore - - - name: Build - working-directory: ./src - run: dotnet build --no-restore - - - name: Upload Build Artifact - uses: actions/upload-artifact@v4 - with: - name: buildArtifact - path: ./src - retention-days: 7 + uses: ./.github/workflows/workflow-build.yml tests: - name: .Run Unit Tests - runs-on: ubuntu-latest needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@v4 - with: - name: buildArtifact - path: ./src - - - name: Test - working-directory: ./src/NodeDev.Tests - run: dotnet test --no-build --verbosity normal + uses: ./.github/workflows/workflow-tests.yml e2e-tests: - runs-on: ubuntu-latest needs: build - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@master - with: - name: buildArtifact - path: ./src - - - name: Build Necessary for Playwright - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet build - - - name: Allow run - run: chmod -R +x ./src/NodeDev.Blazor.Server/bin - - - name: Ensure browsers are installed - run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps - - - name: Test - env: - HEADLESS: true - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet test --no-build --verbosity normal - - - name: Upload std Artifact - if: failure() - uses: actions/upload-artifact@v4 - with: - name: logServer - path: ./src/NodeDev.Blazor.Server/logs - retention-days: 7 \ No newline at end of file + uses: ./.github/workflows/workflow-e2e-tests.yml \ No newline at end of file diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml index 91c96f8..c85a0b7 100644 --- a/.github/workflows/workflow-e2e-tests.yml +++ b/.github/workflows/workflow-e2e-tests.yml @@ -6,7 +6,6 @@ on: jobs: e2e-tests: runs-on: ubuntu-latest - needs: build steps: - name: Setup .NET diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index 01a47ab..ba619f7 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -6,7 +6,6 @@ on: jobs: tests: runs-on: ubuntu-latest - needs: build steps: - name: Setup .NET From f4983b6f7705b3f56c5584c72fe0132e76cf0632 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 17:08:38 -0500 Subject: [PATCH 06/10] Display the workflow run name correctly --- .github/workflows/workflow-build.yml | 2 +- .github/workflows/workflow-e2e-tests.yml | 2 +- .github/workflows/workflow-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow-build.yml b/.github/workflows/workflow-build.yml index c1808dd..55aed8e 100644 --- a/.github/workflows/workflow-build.yml +++ b/.github/workflows/workflow-build.yml @@ -1,4 +1,4 @@ -name: .Build the entire solution +run-name: .Build the entire solution on: workflow_call: diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml index c85a0b7..6ac7e77 100644 --- a/.github/workflows/workflow-e2e-tests.yml +++ b/.github/workflows/workflow-e2e-tests.yml @@ -1,4 +1,4 @@ -name: Run End To End Tests +run-name: Run End To End Tests on: workflow_call: diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index ba619f7..b2065a5 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -1,4 +1,4 @@ -name: .Run Unit Tests +run-name: .Run Unit Tests on: workflow_call: From c7079a8acbfe54def16627f63b6aeea172ac2765 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 19:13:31 -0500 Subject: [PATCH 07/10] Update job names --- .github/workflows/dotnet.yml | 3 ++- .github/workflows/release.yml | 1 + .github/workflows/workflow-build-and-tests.yml | 3 +++ .github/workflows/workflow-build.yml | 2 +- .github/workflows/workflow-e2e-tests.yml | 2 +- .github/workflows/workflow-tests.yml | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d2a113b..73b59c9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,6 +10,7 @@ on: branches: [ "master" ] jobs: - build: + build-and-test: + name: .Build and Tests uses: ./.github/workflows/workflow-build-and-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab9d875..9100f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ permissions: jobs: build-and-tests: + name: .Build and Tests uses: ./.github/workflows/workflow-build-and-tests.yml publish: diff --git a/.github/workflows/workflow-build-and-tests.yml b/.github/workflows/workflow-build-and-tests.yml index 91752b8..3f9e8a3 100644 --- a/.github/workflows/workflow-build-and-tests.yml +++ b/.github/workflows/workflow-build-and-tests.yml @@ -5,12 +5,15 @@ on: jobs: build: + name: .Build the entire solution uses: ./.github/workflows/workflow-build.yml tests: + name: .Run Unit Tests needs: build uses: ./.github/workflows/workflow-tests.yml e2e-tests: + name: .Run End To End Tests needs: build uses: ./.github/workflows/workflow-e2e-tests.yml \ No newline at end of file diff --git a/.github/workflows/workflow-build.yml b/.github/workflows/workflow-build.yml index 55aed8e..c1808dd 100644 --- a/.github/workflows/workflow-build.yml +++ b/.github/workflows/workflow-build.yml @@ -1,4 +1,4 @@ -run-name: .Build the entire solution +name: .Build the entire solution on: workflow_call: diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml index 6ac7e77..04add29 100644 --- a/.github/workflows/workflow-e2e-tests.yml +++ b/.github/workflows/workflow-e2e-tests.yml @@ -1,4 +1,4 @@ -run-name: Run End To End Tests +name: .Run End To End Tests on: workflow_call: diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index b2065a5..ba619f7 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -1,4 +1,4 @@ -run-name: .Run Unit Tests +name: .Run Unit Tests on: workflow_call: From 39dedc109edf364feaa5edc133d2b4afd4c84dae Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 19:33:41 -0500 Subject: [PATCH 08/10] Removed the build-and-test workflow --- .github/workflows/dotnet.yml | 16 +++- .github/workflows/release.yml | 18 ++++- .../workflows/workflow-build-and-tests.yml | 19 ----- .github/workflows/workflow-e2e-tests.yml | 75 ++++++++++--------- .github/workflows/workflow-tests.yml | 29 +++---- 5 files changed, 80 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/workflow-build-and-tests.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 73b59c9..556d8b7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,7 +10,17 @@ on: branches: [ "master" ] jobs: - build-and-test: - name: .Build and Tests - uses: ./.github/workflows/workflow-build-and-tests.yml + build: + name: .Build the entire solution + uses: ./.github/workflows/workflow-build.yml + + tests: + name: .Run Unit Tests + needs: build + uses: ./.github/workflows/workflow-tests.yml + + e2e-tests: + name: .Run End To End Tests + needs: build + uses: ./.github/workflows/workflow-e2e-tests.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9100f5d..0f55efa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,14 +11,24 @@ permissions: contents: write jobs: - build-and-tests: - name: .Build and Tests - uses: ./.github/workflows/workflow-build-and-tests.yml + build: + name: .Build the entire solution + uses: ./.github/workflows/workflow-build.yml + + tests: + name: .Run Unit Tests + needs: build + uses: ./.github/workflows/workflow-tests.yml + + e2e-tests: + name: .Run End To End Tests + needs: build + uses: ./.github/workflows/workflow-e2e-tests.yml publish: name: Publish and package runs-on: windows-latest - needs: [build-and-tests] + needs: [build,tests,e2e-tests] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workflow-build-and-tests.yml b/.github/workflows/workflow-build-and-tests.yml deleted file mode 100644 index 3f9e8a3..0000000 --- a/.github/workflows/workflow-build-and-tests.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: .Build and Tests - -on: - workflow_call: - -jobs: - build: - name: .Build the entire solution - uses: ./.github/workflows/workflow-build.yml - - tests: - name: .Run Unit Tests - needs: build - uses: ./.github/workflows/workflow-tests.yml - - e2e-tests: - name: .Run End To End Tests - needs: build - uses: ./.github/workflows/workflow-e2e-tests.yml \ No newline at end of file diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml index 04add29..1256c1f 100644 --- a/.github/workflows/workflow-e2e-tests.yml +++ b/.github/workflows/workflow-e2e-tests.yml @@ -4,40 +4,41 @@ on: workflow_call: jobs: - e2e-tests: - runs-on: ubuntu-latest - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - - - uses: actions/download-artifact@master - with: - name: buildArtifact - path: ./src - - - name: Build Necessary for Playwright - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet build - - - name: Allow run - run: chmod -R +x ./src/NodeDev.Blazor.Server/bin - - - name: Ensure browsers are installed - run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps - - - name: Test - env: - HEADLESS: true - working-directory: ./src/NodeDev.EndToEndTests - run: dotnet test --no-build --verbosity normal - - - name: Upload std Artifact - if: failure() - uses: actions/upload-artifact@v4 - with: - name: logServer - path: ./src/NodeDev.Blazor.Server/logs - retention-days: 7 \ No newline at end of file + e2e-tests: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - uses: actions/download-artifact@master + with: + name: buildArtifact + path: ./src + + - name: Build Necessary for Playwright + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet build + + - name: Allow run + run: chmod -R +x ./src/NodeDev.Blazor.Server/bin + + - name: Ensure browsers are installed + run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps + + - name: Test + env: + HEADLESS: true + working-directory: ./src/NodeDev.EndToEndTests + run: dotnet test --no-build --verbosity normal + + - name: Upload std Artifact + if: failure() + uses: actions/upload-artifact@v4 + with: + name: logServer + path: ./src/NodeDev.Blazor.Server/logs + retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index ba619f7..eb8fd74 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -4,20 +4,21 @@ on: workflow_call: jobs: - tests: - runs-on: ubuntu-latest + tests: + runs-on: ubuntu-latest + needs: build - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x - - uses: actions/download-artifact@v4 - with: - name: buildArtifact - path: ./src + - uses: actions/download-artifact@v4 + with: + name: buildArtifact + path: ./src - - name: Test - working-directory: ./src/NodeDev.Tests - run: dotnet test --no-build --verbosity normal \ No newline at end of file + - name: Test + working-directory: ./src/NodeDev.Tests + run: dotnet test --no-build --verbosity normal \ No newline at end of file From 693164a4a18403319f9bb8f3dc0d84b229474227 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Sat, 23 Nov 2024 19:35:15 -0500 Subject: [PATCH 09/10] Cannot wait for build inside the tests workflow --- .github/workflows/workflow-e2e-tests.yml | 1 - .github/workflows/workflow-tests.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/workflow-e2e-tests.yml b/.github/workflows/workflow-e2e-tests.yml index 1256c1f..007f458 100644 --- a/.github/workflows/workflow-e2e-tests.yml +++ b/.github/workflows/workflow-e2e-tests.yml @@ -6,7 +6,6 @@ on: jobs: e2e-tests: runs-on: ubuntu-latest - needs: build steps: - name: Setup .NET diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index eb8fd74..fe45b30 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -6,7 +6,6 @@ on: jobs: tests: runs-on: ubuntu-latest - needs: build steps: - name: Setup .NET From e135af0442865ba5adf33dc3ac1e2f38f4660454 Mon Sep 17 00:00:00 2001 From: Jordan Fiset Date: Fri, 29 Nov 2024 20:46:05 -0500 Subject: [PATCH 10/10] Removed the . in the description --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 556d8b7..c431238 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,16 +11,16 @@ on: jobs: build: - name: .Build the entire solution + name: Build the entire solution uses: ./.github/workflows/workflow-build.yml tests: - name: .Run Unit Tests + name: Run Unit Tests needs: build uses: ./.github/workflows/workflow-tests.yml e2e-tests: - name: .Run End To End Tests + name: Run End To End Tests needs: build uses: ./.github/workflows/workflow-e2e-tests.yml