From dcdca19f4b79cb971e3534729ef7d5bfa263e326 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Thu, 1 May 2025 13:42:44 +0100 Subject: [PATCH 01/28] ci(dev): gitguardian ref removed --- .github/workflows/dev.yml | 4 ++-- .github/workflows/release.yml | 2 +- README.md | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c501240..7142bc7 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -111,7 +111,7 @@ jobs: # Hence explicit "if" and "needs" generate-dev-semantic-version: if: success() - needs: [commitlint, gitguardian-scan, Unit-Tests, E2E-Tests, Code-Coverage, branch-name-check] + needs: [commitlint, Unit-Tests, E2E-Tests, Code-Coverage, branch-name-check] runs-on: ubuntu-latest outputs: dev-package-version: ${{ steps.set-dev-semantic-version.outputs.dev-semantic-version }} @@ -245,7 +245,7 @@ jobs: Make-WasmStaticClient-DevShowCase-Artifact-Trigger-GH-Pages-In-TELBlazor-DevShowCase-Repo: if: success() #not needed but being explicit - needs: [ branch-name-check, build-telblazor-dev-package-and-publish,generate-dev-semantic-version, commitlint, gitguardian-scan, Unit-Tests, E2E-Tests] + needs: [ branch-name-check, build-telblazor-dev-package-and-publish,generate-dev-semantic-version, commitlint, Unit-Tests, E2E-Tests] runs-on: ubuntu-latest env: DEV_TELBLAZOR_PACKAGE_VERSION: ${{ needs.generate-dev-semantic-version.outputs.dev-package-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c11404..abdb35d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: # git fetch --tags # git tag -l # List all tags to see if there are any conflicts - ##configured with .releaseseec + #configured with .releaseseec - name: run semantic release id: set-semantic-version # should need qqqq diff --git a/README.md b/README.md index c47bd27..c5e7d10 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,16 @@ The render cycle will hydrate the prerender and the post actions will be overrid It is client side so the users browser will do the work. +# Links + +[last published package](https://github.com/orgs/TechnologyEnhancedLearning/packages?tab=packages&q=TELBlazor) + +[TELBlazor](https://github.com/TechnologyEnhancedLearning/TELBlazor) + +[TELBlazor Production Showcase](https://technologyenhancedlearning.github.io/TELBlazor/) + +[TELBlazor Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) + +[View Packaged Dev Showcase Code](https://technologyenhancedlearning/TELBlazor-DevShowCase/tree/gh-pages/) + +[View Packaged Showcase Code](https://github.com/TechnologyEnhancedLearning/TELBlazor/tree/gh-pages/) From 2a208e80a4130ad5b13cbc73b16418e2e0a263d6 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Thu, 1 May 2025 15:47:29 +0100 Subject: [PATCH 02/28] ci(checks): from dev yml to check yml --- .github/workflows/dev.yml | 79 +-------- .github/workflows/reuseable-ci-checks.yml | 197 ++++++++++++++-------- 2 files changed, 133 insertions(+), 143 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7142bc7..a2da68f 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -34,76 +34,6 @@ jobs: with: runall: true - branch-name-check: - name: Enforce Branch Name Convention - if: success() || failure() - runs-on: ubuntu-latest - steps: - - name: Validate Branch Name - run: | - #BRANCH_NAME="${GITHUB_HEAD_REF}" - BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" - echo "Validating branch name: $BRANCH_NAME" - - if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then - echo "✅ Branch name is valid" - else - echo "❌ Invalid branch name: $BRANCH_NAME" - echo "Branch names must follow one of the allowed prefixes:" - echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" - exit 1 - fi - continue-on-error: false - - commitlint: - runs-on: ubuntu-latest - if: success() || failure() - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5 - with: - configFile: .commitlintrc.json - continue-on-error: false - - # Global and better as prehook - # gitguardian-scan: - # runs-on: ubuntu-latest - # if: success() || failure() - # steps: - # - uses: actions/checkout@v3 - - # - name: GitGuardian Scan - # uses: GitGuardian/gg-shield-action@v1 - # env: - # GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} - # continue-on-error: false - - Unit-Tests: - runs-on: ubuntu-latest - if: success() || failure() - steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: false - - - E2E-Tests: - runs-on: ubuntu-latest - if: success() || failure() - steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: false - - Code-Coverage: - runs-on: ubuntu-latest - if: success() || failure() - steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: false # Now we've done due diligence # The checks have been allowed to run if the workflow fails so if there a multiple fails we know. @@ -226,12 +156,15 @@ jobs: run: npm ci #CI is an install that adheres to package-lock - - name: Build BlazorComponentLibrary (it publishes on build) + - name: Build TELBlazor.Components (it publishes on build) + env: + DISABLE_PACKAGE_GENERATION: false run: | - dotnet build Package.BlazorComponentLibrary -c Release \ + dotnet build TELBlazor.Components -c Release \ /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ - /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE + /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION - name: Publish to TechnologyEnhancedLearning as a Dev Package run: | diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 385db4d..2878368 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -1,7 +1,5 @@ #qqqq to do refactor to here - - name: Reusable CI Checks on: @@ -22,8 +20,66 @@ jobs: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" - branch-name-check: - name: PR Check Enforce Branch Name Convention + # branch-name-check: + # name: PR Check Enforce Branch Name Convention + # runs-on: ubuntu-latest + # steps: + # - name: Validate Branch Name + # run: | + # #BRANCH_NAME="${GITHUB_HEAD_REF}" + # BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" + # echo "Validating branch name: $BRANCH_NAME" + + # if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]] || [[ "$BRANCH_NAME" == "Automatic_version_update_dependabot" ]]; then + # echo "✅ Branch name is valid" + # else + # echo "❌ Invalid branch name: $BRANCH_NAME" + # echo "Branch names must follow one of the allowed prefixes:" + # echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" + # exit 1 + # fi + # continue-on-error: ${{ inputs.runall }} + + # commitlint: + # name: PR Check commitlint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # - uses: wagoid/commitlint-github-action@v5 + # with: + # configFile: .commitlintrc.json + # continue-on-error: ${{ inputs.runall }} + + # Unit-Tests: + # name: PR Check Unit Tests + # runs-on: ubuntu-latest + # steps: + # - name: See other project pipeline for Tests + # run: echo " See other project pipeline for Tests this is a placeholder" + # continue-on-error: ${{ inputs.runall }} + + # E2E-Tests: + # name: PR Check E2E Tests + # runs-on: ubuntu-latest + # steps: + # - name: See other project pipeline for Tests + # run: echo " See other project pipeline for Tests this is a placeholder" + # continue-on-error: ${{ inputs.runall }} + + # Code-Coverage: + # name: PR Check Code Coverage + # runs-on: ubuntu-latest + # steps: + # - name: Code Coverage + # run: echo "TODO Code Coverage" + # continue-on-error: ${{ inputs.runall }} + + +branch-name-check: + name: Enforce Branch Name Convention + if: success() || failure() runs-on: ubuntu-latest steps: - name: Validate Branch Name @@ -32,7 +88,7 @@ jobs: BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" echo "Validating branch name: $BRANCH_NAME" - if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]] || [[ "$BRANCH_NAME" == "Automatic_version_update_dependabot" ]]; then + if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then echo "✅ Branch name is valid" else echo "❌ Invalid branch name: $BRANCH_NAME" @@ -41,75 +97,76 @@ jobs: exit 1 fi continue-on-error: ${{ inputs.runall }} - - commitlint: - name: PR Check commitlint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5 - with: - configFile: .commitlintrc.json - continue-on-error: ${{ inputs.runall }} - - Unit-Tests: - name: PR Check Unit Tests + + commitlint: runs-on: ubuntu-latest + if: success() || failure() steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: ${{ inputs.runall }} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v5 + with: + configFile: .commitlintrc.json + continue-on-error: ${{ inputs.runall }} + + Unit-Tests: + runs-on: ubuntu-latest + if: success() || failure() + steps: + - name: See other project pipeline for Tests + run: echo " See other project pipeline for Tests this is a placeholder" + continue-on-error: ${{ inputs.runall }} + - E2E-Tests: - name: PR Check E2E Tests - runs-on: ubuntu-latest - steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: ${{ inputs.runall }} + E2E-Tests: + runs-on: ubuntu-latest + if: success() || failure() + steps: + - name: See other project pipeline for Tests + run: echo " See other project pipeline for Tests this is a placeholder" + continue-on-error: ${{ inputs.runall }} + + Code-Coverage: + runs-on: ubuntu-latest + if: success() || failure() + steps: + - name: See other project pipeline for Tests + run: echo " See other project pipeline for Tests this is a placeholder" + continue-on-error: ${{ inputs.runall }} - Code-Coverage: - name: PR Check Code Coverage - runs-on: ubuntu-latest - steps: - - name: Code Coverage - run: echo "TODO Code Coverage" - continue-on-error: ${{ inputs.runall }} + Check-For-Fails: + name: Fail check if running allowed + if: ${{ inputs.runall }} + needs: + - solution-build + - branch-name-check + - commitlint + - Unit-Tests + - E2E-Tests + - Code-Coverage - Check-For-Fails: - name: Fail check if running allowed - if: ${{ inputs.runall }} - needs: - - solution-build - - branch-name-check - - commitlint - - Unit-Tests - - E2E-Tests - - Code-Coverage - - runs-on: ubuntu-latest - steps: - - name: Check-For-Fails - run: echo "TODO Code Coverage" + runs-on: ubuntu-latest + steps: + - name: Check-For-Fails + run: echo "TODO Code Coverage" - - name: Check Job Results - run: | - echo "Solution Build: ${{ needs.solution-build.result }}" - echo "Branch Name Check: ${{ needs.branch-name-check.result }}" - echo "Commitlint: ${{ needs.commitlint.result }}" - echo "Unit Tests: ${{ needs.Unit-Tests.result }}" - echo "E2E Tests: ${{ needs.E2E-Tests.result }}" - echo "Code Coverage: ${{ needs.Code-Coverage.result }}" + - name: Check Job Results + run: | + echo "Solution Build: ${{ needs.solution-build.result }}" + echo "Branch Name Check: ${{ needs.branch-name-check.result }}" + echo "Commitlint: ${{ needs.commitlint.result }}" + echo "Unit Tests: ${{ needs.Unit-Tests.result }}" + echo "E2E Tests: ${{ needs.E2E-Tests.result }}" + echo "Code Coverage: ${{ needs.Code-Coverage.result }}" - if [[ "${{ needs.solution-build.result }}" != "success" || \ - "${{ needs.branch-name-check.result }}" != "success" || \ - "${{ needs.commitlint.result }}" != "success" || \ - "${{ needs.Unit-Tests.result }}" != "success" || \ - "${{ needs.E2E-Tests.result }}" != "success" || \ - "${{ needs.Code-Coverage.result }}" != "success" ]]; then - echo "❌ One or more jobs failed." - exit 1 - fi - continue-on-error: false \ No newline at end of file + if [[ "${{ needs.solution-build.result }}" != "success" || \ + "${{ needs.branch-name-check.result }}" != "success" || \ + "${{ needs.commitlint.result }}" != "success" || \ + "${{ needs.Unit-Tests.result }}" != "success" || \ + "${{ needs.E2E-Tests.result }}" != "success" || \ + "${{ needs.Code-Coverage.result }}" != "success" ]]; then + echo "❌ One or more jobs failed." + exit 1 + fi + continue-on-error: false \ No newline at end of file From ea6e0f0d461df65529be3239d0e600fd489232ae Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Thu, 1 May 2025 17:00:12 +0100 Subject: [PATCH 03/28] ci(commitlint): test --- .github/workflows/workflow-readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow-readme.md b/.github/workflows/workflow-readme.md index 052a01c..4a949a0 100644 --- a/.github/workflows/workflow-readme.md +++ b/.github/workflows/workflow-readme.md @@ -11,7 +11,7 @@ Dev Check Test Package TELBlazor.Components Trigger TELBlazor-DevShowCase Deploy ## Pull_Request - + ## Release # Notes From 847cee87924655a522fad2a212b3907eac61e33b Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Thu, 1 May 2025 17:29:04 +0100 Subject: [PATCH 04/28] ci(gogh): vcbcv --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c5e7d10..baa8931 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ TEL Blazor Component Library Package Progressive components, that use the server prerendering in Global Wasm Blazor to ensure that if the user has no JS they will get html. And that html can be created to have working post actions. The render cycle will hydrate the prerender and the post actions will be overrided by services injected in the components. It is client side so the users browser will do the work. - + # Links From b7f6a4e06ca780ee2798261d0c83871bf441a585 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Thu, 1 May 2025 18:00:11 +0100 Subject: [PATCH 05/28] ci(cicd): editmsg --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baa8931..7f3550f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Progressive components, that use the server prerendering in Global Wasm Blazor t The render cycle will hydrate the prerender and the post actions will be overrided by services injected in the components. It is client side so the users browser will do the work. - + # Links [last published package](https://github.com/orgs/TechnologyEnhancedLearning/packages?tab=packages&q=TELBlazor) From 17b4018d8263e38f099a43a7fda4af24dff712ea Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 09:03:53 +0100 Subject: [PATCH 06/28] ci(prehooks): local global precommit and prepush commitlint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f3550f..ae08750 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ TEL Blazor Component Library Package Progressive components, that use the server prerendering in Global Wasm Blazor to ensure that if the user has no JS they will get html. And that html can be created to have working post actions. The render cycle will hydrate the prerender and the post actions will be overrided by services injected in the components. -It is client side so the users browser will do the work. +It is client side so the users browser will do the work. # Links From 1427209310f01be4f504b525f890683168090524 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 09:08:58 +0100 Subject: [PATCH 07/28] ci(dev.yml): needs reuseable workflow --- .github/workflows/dev.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index a2da68f..0053b10 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -22,8 +22,6 @@ env: # Build Set Up USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false - - jobs: @@ -41,7 +39,8 @@ jobs: # Hence explicit "if" and "needs" generate-dev-semantic-version: if: success() - needs: [commitlint, Unit-Tests, E2E-Tests, Code-Coverage, branch-name-check] + #needs qqqq: [commitlint, Unit-Tests, E2E-Tests, Code-Coverage, branch-name-check] + needs: [call-reusable-ci-checks-workflow] runs-on: ubuntu-latest outputs: dev-package-version: ${{ steps.set-dev-semantic-version.outputs.dev-semantic-version }} @@ -123,7 +122,8 @@ jobs: build-telblazor-dev-package-and-publish: if: success() - needs: [generate-dev-semantic-version, commitlint, Unit-Tests,E2E-Tests, Code-Coverage, branch-name-check] + #qqqq needs: [generate-dev-semantic-version, commitlint, Unit-Tests,E2E-Tests, Code-Coverage, branch-name-check] + needs: [generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest env: DEV_TELBLAZOR_PACKAGE_VERSION: ${{ needs.generate-dev-semantic-version.outputs.dev-package-version }} @@ -178,12 +178,12 @@ jobs: Make-WasmStaticClient-DevShowCase-Artifact-Trigger-GH-Pages-In-TELBlazor-DevShowCase-Repo: if: success() #not needed but being explicit - needs: [ branch-name-check, build-telblazor-dev-package-and-publish,generate-dev-semantic-version, commitlint, Unit-Tests, E2E-Tests] + #needs qqqq: [ branch-name-check, build-telblazor-dev-package-and-publish,generate-dev-semantic-version, commitlint, Unit-Tests, E2E-Tests] + needs: [build-telblazor-dev-package-and-publish, generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest env: DEV_TELBLAZOR_PACKAGE_VERSION: ${{ needs.generate-dev-semantic-version.outputs.dev-package-version }} - steps: - name: Checkout Code uses: actions/checkout@v4 From 4d5f6ecc10da9e3f460568ac07bd4074f68604ed Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 09:16:27 +0100 Subject: [PATCH 08/28] ci(reuseable ci): indentation --- .github/workflows/reuseable-ci-checks.yml | 168 +++++++++++----------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 2878368..2aec6da 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -12,91 +12,34 @@ on: jobs: #qqqq may need just a place holder set of values or some repo wide environmental values - solution-build: - name: Check Solution Builds - runs-on: ubuntu-latest - continue-on-error: ${{ inputs.runall }} - steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" - - # branch-name-check: - # name: PR Check Enforce Branch Name Convention - # runs-on: ubuntu-latest - # steps: - # - name: Validate Branch Name - # run: | - # #BRANCH_NAME="${GITHUB_HEAD_REF}" - # BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" - # echo "Validating branch name: $BRANCH_NAME" + solution-build: + name: Check Solution Builds + runs-on: ubuntu-latest + continue-on-error: ${{ inputs.runall }} + steps: + - name: See other project pipeline for Tests + run: echo " See other project pipeline for Tests this is a placeholder" - # if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]] || [[ "$BRANCH_NAME" == "Automatic_version_update_dependabot" ]]; then - # echo "✅ Branch name is valid" - # else - # echo "❌ Invalid branch name: $BRANCH_NAME" - # echo "Branch names must follow one of the allowed prefixes:" - # echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" - # exit 1 - # fi - # continue-on-error: ${{ inputs.runall }} - - # commitlint: - # name: PR Check commitlint - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - # - uses: wagoid/commitlint-github-action@v5 - # with: - # configFile: .commitlintrc.json - # continue-on-error: ${{ inputs.runall }} - - # Unit-Tests: - # name: PR Check Unit Tests - # runs-on: ubuntu-latest - # steps: - # - name: See other project pipeline for Tests - # run: echo " See other project pipeline for Tests this is a placeholder" - # continue-on-error: ${{ inputs.runall }} - - # E2E-Tests: - # name: PR Check E2E Tests - # runs-on: ubuntu-latest - # steps: - # - name: See other project pipeline for Tests - # run: echo " See other project pipeline for Tests this is a placeholder" - # continue-on-error: ${{ inputs.runall }} - - # Code-Coverage: - # name: PR Check Code Coverage - # runs-on: ubuntu-latest - # steps: - # - name: Code Coverage - # run: echo "TODO Code Coverage" - # continue-on-error: ${{ inputs.runall }} - - -branch-name-check: - name: Enforce Branch Name Convention - if: success() || failure() - runs-on: ubuntu-latest - steps: - - name: Validate Branch Name - run: | - #BRANCH_NAME="${GITHUB_HEAD_REF}" - BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" - echo "Validating branch name: $BRANCH_NAME" + branch-name-check: + name: Enforce Branch Name Convention + if: success() || failure() + runs-on: ubuntu-latest + steps: + - name: Validate Branch Name + run: | + #BRANCH_NAME="${GITHUB_HEAD_REF}" + BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" + echo "Validating branch name: $BRANCH_NAME" - if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then - echo "✅ Branch name is valid" - else - echo "❌ Invalid branch name: $BRANCH_NAME" - echo "Branch names must follow one of the allowed prefixes:" - echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" - exit 1 - fi - continue-on-error: ${{ inputs.runall }} + if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then + echo "✅ Branch name is valid" + else + echo "❌ Invalid branch name: $BRANCH_NAME" + echo "Branch names must follow one of the allowed prefixes:" + echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" + exit 1 + fi + continue-on-error: ${{ inputs.runall }} commitlint: runs-on: ubuntu-latest @@ -169,4 +112,61 @@ branch-name-check: echo "❌ One or more jobs failed." exit 1 fi - continue-on-error: false \ No newline at end of file + continue-on-error: false + + + # branch-name-check: + # name: PR Check Enforce Branch Name Convention + # runs-on: ubuntu-latest + # steps: + # - name: Validate Branch Name + # run: | + # #BRANCH_NAME="${GITHUB_HEAD_REF}" + # BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" + # echo "Validating branch name: $BRANCH_NAME" + + # if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]] || [[ "$BRANCH_NAME" == "Automatic_version_update_dependabot" ]]; then + # echo "✅ Branch name is valid" + # else + # echo "❌ Invalid branch name: $BRANCH_NAME" + # echo "Branch names must follow one of the allowed prefixes:" + # echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" + # exit 1 + # fi + # continue-on-error: ${{ inputs.runall }} + + # commitlint: + # name: PR Check commitlint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # - uses: wagoid/commitlint-github-action@v5 + # with: + # configFile: .commitlintrc.json + # continue-on-error: ${{ inputs.runall }} + + # Unit-Tests: + # name: PR Check Unit Tests + # runs-on: ubuntu-latest + # steps: + # - name: See other project pipeline for Tests + # run: echo " See other project pipeline for Tests this is a placeholder" + # continue-on-error: ${{ inputs.runall }} + + # E2E-Tests: + # name: PR Check E2E Tests + # runs-on: ubuntu-latest + # steps: + # - name: See other project pipeline for Tests + # run: echo " See other project pipeline for Tests this is a placeholder" + # continue-on-error: ${{ inputs.runall }} + + # Code-Coverage: + # name: PR Check Code Coverage + # runs-on: ubuntu-latest + # steps: + # - name: Code Coverage + # run: echo "TODO Code Coverage" + # continue-on-error: ${{ inputs.runall }} \ No newline at end of file From 3e3430dbac59aa589f9ba6529cc854f5652ab6e6 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 09:40:23 +0100 Subject: [PATCH 09/28] ci(dev fallback if not git tag yet): need package token on repo too --- .github/workflows/dev.yml | 5 ++ .github/workflows/reuseable-ci-checks.yml | 57 ----------------------- 2 files changed, 5 insertions(+), 57 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 0053b10..7eeb9e3 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -98,6 +98,11 @@ jobs: # This tag may not belong to the current branch, so the result isn't guaranteed to reflect the latest changes on this branch. echo "Semver fallback: using latest Git tag, which may not be from the current branch." fi + + if [ -z "$SEMVER_OUTPUT" ]; then + SEMVER_OUTPUT="0.0.0" + echo "No semantic version or tag, defaulting to 0.0.0 $SEMVER_OUTPUT" + fi # Export the result to the environment echo "SEMVER_OUTPUT=$SEMVER_OUTPUT" >> $GITHUB_ENV diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 2aec6da..552e576 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -113,60 +113,3 @@ jobs: exit 1 fi continue-on-error: false - - - # branch-name-check: - # name: PR Check Enforce Branch Name Convention - # runs-on: ubuntu-latest - # steps: - # - name: Validate Branch Name - # run: | - # #BRANCH_NAME="${GITHUB_HEAD_REF}" - # BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" - # echo "Validating branch name: $BRANCH_NAME" - - # if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]] || [[ "$BRANCH_NAME" == "Automatic_version_update_dependabot" ]]; then - # echo "✅ Branch name is valid" - # else - # echo "❌ Invalid branch name: $BRANCH_NAME" - # echo "Branch names must follow one of the allowed prefixes:" - # echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" - # exit 1 - # fi - # continue-on-error: ${{ inputs.runall }} - - # commitlint: - # name: PR Check commitlint - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - # - uses: wagoid/commitlint-github-action@v5 - # with: - # configFile: .commitlintrc.json - # continue-on-error: ${{ inputs.runall }} - - # Unit-Tests: - # name: PR Check Unit Tests - # runs-on: ubuntu-latest - # steps: - # - name: See other project pipeline for Tests - # run: echo " See other project pipeline for Tests this is a placeholder" - # continue-on-error: ${{ inputs.runall }} - - # E2E-Tests: - # name: PR Check E2E Tests - # runs-on: ubuntu-latest - # steps: - # - name: See other project pipeline for Tests - # run: echo " See other project pipeline for Tests this is a placeholder" - # continue-on-error: ${{ inputs.runall }} - - # Code-Coverage: - # name: PR Check Code Coverage - # runs-on: ubuntu-latest - # steps: - # - name: Code Coverage - # run: echo "TODO Code Coverage" - # continue-on-error: ${{ inputs.runall }} \ No newline at end of file From 22836ea9df94dde9804809464584504db774314d Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 11:04:22 +0100 Subject: [PATCH 10/28] ci(dev.yml): org nugetkey token for packagestoken --- .github/workflows/dev.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7eeb9e3..0c52b85 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -13,7 +13,8 @@ env: # Permission GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} + PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} + # PACKAGES_TOKEN qqqq GITHUB_USERNAME: "Phil-NHS" # Nuget Set Up From 764f6163cd3ffff78551b0c72f991cf883147a50 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 11:29:59 +0100 Subject: [PATCH 11/28] ci(dev.yml): correct showcase proj name --- .github/workflows/dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 0c52b85..475a1fc 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -228,9 +228,9 @@ jobs: #qqqq with recent changes can we just build the solution now if this works then check - - name: Build Shared Pages + - name: Build TELBlazor.Components.ShowCase.Shared run: | - dotnet build SharedPages -c Release \ + dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ From 6ffaa2782d73f7b74a9d79aa28042d0569888660 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 11:36:58 +0100 Subject: [PATCH 12/28] ci(nuget package name): Changed package name --- nuget.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuget.config b/nuget.config index 7a52896..379e4fb 100644 --- a/nuget.config +++ b/nuget.config @@ -16,7 +16,7 @@ - + From 21c24761ba536416947f84278379382858f63237 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 11:48:36 +0100 Subject: [PATCH 13/28] ci(dev): csproj name --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 475a1fc..ea86465 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -251,7 +251,7 @@ jobs: - name: Publish WasmStaticClient run: | - dotnet publish ./TELBlazor/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ + dotnet publish TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ From 84a3b7b3b8fcd0196e0e03dfd7034372cccc4662 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 11:54:23 +0100 Subject: [PATCH 14/28] ci(dev): csproj route --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ea86465..352fd75 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -251,7 +251,7 @@ jobs: - name: Publish WasmStaticClient run: | - dotnet publish TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ + dotnet publish ./TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ From c64cfe3856c0c36c4d78e9145af3b795288152c7 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 12:33:49 +0100 Subject: [PATCH 15/28] ci(wasmstatic): publish route --- .../TELBlazor.Components.ShowCase.WasmStaticClient.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj index bd98777..58d2579 100644 --- a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj +++ b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj @@ -5,7 +5,7 @@ enable enable - $(MSBuildProjectDirectory)\..\..\docs\ + $(MSBuildProjectDirectory)\..\docs\ From ef9769264e3b40804706f007b29987475f45afc8 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 12:54:29 +0100 Subject: [PATCH 16/28] ci(dev.yml): set artifact url to env --- .github/workflows/dev.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 352fd75..4d5e6cf 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -237,7 +237,18 @@ jobs: /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE # /p:GhPageRelease=false \ qqqq is it still a thing? - + - name: Get artifact location + run: | + # Get the artifact list for the current workflow run + ARTIFACT_LIST=$(gh api "repos/TechnologyEnhancedLearning/TELBlazor/actions/runs/${GITHUB_RUN_ID}/artifacts") + # Echo the entire artifact list for debugging purposes + echo "Artifact List: $ARTIFACT_LIST" + # Extract the download URL from the artifact list (first artifact in the list) + #ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].archive_download_url') + ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].url') + # Echo the artifact URL to confirm + echo "Artifact URL: $ARTIFACT_URL" + echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV # qqqq no longer needed @@ -279,7 +290,7 @@ jobs: - name: Creating artifact of publish folder for test gh page workflow uses: actions/upload-artifact@v4 with: - name: gh-blazor-components-wiki-site-using-package-${{env.DEV_TELBLAZOR_PACKAGE_VERSION}} + name: published-telblazor-components-showcase-wasmstaticclient-using-dev-package-${{env.DEV_TELBLAZOR_PACKAGE_VERSION}} include-hidden-files: true path: | ./docs From f9a431ee4f53839085b1f278dabaf12e6cca313e Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 12:59:55 +0100 Subject: [PATCH 17/28] ci(dev): get artifact location job order --- .github/workflows/dev.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 4d5e6cf..14c3ba5 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -237,18 +237,7 @@ jobs: /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE # /p:GhPageRelease=false \ qqqq is it still a thing? - - name: Get artifact location - run: | - # Get the artifact list for the current workflow run - ARTIFACT_LIST=$(gh api "repos/TechnologyEnhancedLearning/TELBlazor/actions/runs/${GITHUB_RUN_ID}/artifacts") - # Echo the entire artifact list for debugging purposes - echo "Artifact List: $ARTIFACT_LIST" - # Extract the download URL from the artifact list (first artifact in the list) - #ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].archive_download_url') - ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].url') - # Echo the artifact URL to confirm - echo "Artifact URL: $ARTIFACT_URL" - echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV + # qqqq no longer needed @@ -297,6 +286,19 @@ jobs: ./docs/.nojekyll # explicitly include the .nojekyll file retention-days: 90 + - name: Get artifact location + run: | + # Get the artifact list for the current workflow run + ARTIFACT_LIST=$(gh api "repos/TechnologyEnhancedLearning/TELBlazor/actions/runs/${GITHUB_RUN_ID}/artifacts") + # Echo the entire artifact list for debugging purposes + echo "Artifact List: $ARTIFACT_LIST" + # Extract the download URL from the artifact list (first artifact in the list) + #ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].archive_download_url') + ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].url') + # Echo the artifact URL to confirm + echo "Artifact URL: $ARTIFACT_URL" + echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV + - name: Trigger Workflow in TELBlazor-DevShowCase Repository run: | repo_owner="TechnologyEnhancedLearning" From 0655ce6244da32a5138c7b6d57ca7e901e7714c9 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 13:46:10 +0100 Subject: [PATCH 18/28] ci(wasm static proj): flatten wwwroot for gh-pages --- .gitignore | 1 + ...Components.ShowCase.WasmStaticClient.csproj | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e842a75..f8086e1 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ _Pvt_Extensions /GenerateTreeStructure.ps1 **/Properties/launchSettings.json CHANGELOG.md +/docs diff --git a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj index 58d2579..22dca2d 100644 --- a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj +++ b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj @@ -6,12 +6,28 @@ enable $(MSBuildProjectDirectory)\..\docs\ + $(PublishDir)\wwwroot\ - + + + + + + + + + + + + + From 648d09ae8101e0599f1e459263b340d94d446d91 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 14:50:17 +0100 Subject: [PATCH 19/28] ci(reuseable ci checks): build check --- .github/workflows/release.yml | 29 +++--------- .github/workflows/reuseable-ci-checks.yml | 56 +++++++++++++++++++++-- 2 files changed, 59 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abdb35d..61fd1ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,9 @@ permissions: env: - # Permission GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} + PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} GITHUB_USERNAME: "Phil-NHS" # Nuget Set Up @@ -23,7 +22,6 @@ env: # Build Set Up USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false - jobs: generate-semantic-version: runs-on: ubuntu-latest @@ -36,10 +34,6 @@ jobs: fetch-depth: 0 # required for semantic release to analyze commit history - name: Install Semantic Release Packages - # qqqq shouldnt need - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} run: | echo "Installing semantic-release packages..." npm install -D \ @@ -52,22 +46,11 @@ jobs: echo "Semantic Release packages installed." npm ls --depth=0 # Debug: List installed packages -#qqqq - # - name: Debug Git Remote Branches - # run: git remote show origin - - # - name: Check Existing Tags - # run: | - # echo "Checking existing tags..." - # git fetch --tags - # git tag -l # List all tags to see if there are any conflicts + #configured with .releaseseec - name: run semantic release id: set-semantic-version - # should need qqqq - # env: - # github_token: ${{ secrets.github_token }} run: | set +e SEMVER_VERSION=$(npx semantic-release | grep -oP 'Published release \K[\d.]+') @@ -173,10 +156,10 @@ jobs: echo "Listing packages.lock.json files:" find . -name "packages.lock.json" -type f -print - - - name: Build Shared Pages + #qqqq do we need this can we not build the package, then build the project with package build false or just build the package then the wasm proje + - name: Build TELBlazor.Components.ShowCase.Shared run: | - dotnet build SharedPages -c Release \ + dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ @@ -185,7 +168,7 @@ jobs: - name: Publish WasmStaticClient run: | - dotnet publish ./TELBlazor/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ + dotnet publish ./TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 552e576..2539588 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -9,17 +9,67 @@ on: required: false type: boolean default: false + +env: + + + # Permission + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} + # GITHUB_USERNAME: "Phil-NHS" + + # Nuget Set Up + TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH: ${{ github.workspace }}/CICDPackageLocation + TELBLAZOR_PACKAGE_SOURCE: ${{ github.workspace }}/CICDPackageLocation + #TELBLAZOR_PACKAGE_SOURCE: "https://nuget.pkg.github.com/TechnologyEnhancedLearning/index.json" + + # Build Set Up + USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false + DISABLE_PACKAGE_GENERATION: true + + # Check Dummy Data + TELBLAZOR_PACKAGE_VERSION: "0.0.0-ci-checks" + jobs: - #qqqq may need just a place holder set of values or some repo wide environmental values + + # Build Package + # Build Solution useing package solution-build: name: Check Solution Builds runs-on: ubuntu-latest continue-on-error: ${{ inputs.runall }} + steps: - - name: See other project pipeline for Tests - run: echo " See other project pipeline for Tests this is a placeholder" + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build and Create Package locally + env: + #Overwrite package generation + DISABLE_PACKAGE_GENERATION: false + run: | + dotnet build TELBlazor.Components -c Release \ + /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ + /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ + /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \ + /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION + + - name: Build Solution without generating new package + env: + #Overwrite package generation + DISABLE_PACKAGE_GENERATION: true + run: | + dotnet build TELBlazor.sln -c Release \ + /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ + /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ + /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \ + /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION + branch-name-check: name: Enforce Branch Name Convention if: success() || failure() From 053ca8e85b12a58000d79ffab171c3e50d99f9db Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 15:21:15 +0100 Subject: [PATCH 20/28] ci(reuseable): build steps added --- .github/workflows/reuseable-ci-checks.yml | 69 ++++++++++++++++------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 2539588..251adf3 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -12,7 +12,6 @@ on: env: - # Permission # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} @@ -39,12 +38,34 @@ jobs: name: Check Solution Builds runs-on: ubuntu-latest continue-on-error: ${{ inputs.runall }} - + outputs: + status: ${{ job.status }} steps: - name: Checkout code uses: actions/checkout@v3 - + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: global.json + + - name: Replace local environment variable in nuget config because cant provide it as a parameter + run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config + + - name: Clean lock files because the newly generated package file will superseed the locks + run: | + find . -name "packages.lock.json" -type f -exec rm -f {} \; + + - name: Set up Node.js so we have gulp for retrieving TEL Frontend Css + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install npm packages so we have gulp for retrieving TEL Frontend Css + working-directory: ./TELBlazor.Components + run: npm ci + - name: Build and Create Package locally env: #Overwrite package generation @@ -73,6 +94,8 @@ jobs: branch-name-check: name: Enforce Branch Name Convention if: success() || failure() + outputs: + status: ${{ job.status }} runs-on: ubuntu-latest steps: - name: Validate Branch Name @@ -94,6 +117,8 @@ jobs: commitlint: runs-on: ubuntu-latest if: success() || failure() + outputs: + status: ${{ job.status }} steps: - uses: actions/checkout@v4 with: @@ -106,6 +131,8 @@ jobs: Unit-Tests: runs-on: ubuntu-latest if: success() || failure() + outputs: + status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" @@ -115,6 +142,8 @@ jobs: E2E-Tests: runs-on: ubuntu-latest if: success() || failure() + outputs: + status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" @@ -123,13 +152,15 @@ jobs: Code-Coverage: runs-on: ubuntu-latest if: success() || failure() + outputs: + status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" continue-on-error: ${{ inputs.runall }} Check-For-Fails: - name: Fail check if running allowed + name: Check for failures if: ${{ inputs.runall }} needs: - solution-build @@ -141,25 +172,23 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check-For-Fails - run: echo "TODO Code Coverage" - - name: Check Job Results run: | - echo "Solution Build: ${{ needs.solution-build.result }}" - echo "Branch Name Check: ${{ needs.branch-name-check.result }}" - echo "Commitlint: ${{ needs.commitlint.result }}" - echo "Unit Tests: ${{ needs.Unit-Tests.result }}" - echo "E2E Tests: ${{ needs.E2E-Tests.result }}" - echo "Code Coverage: ${{ needs.Code-Coverage.result }}" + echo "Solution Build: ${{ needs.solution-build.outputs.status }}" + echo "Branch Name Check: ${{ needs.branch-name-check.outputs.status }}" + echo "Commitlint: ${{ needs.commitlint.outputs.status }}" + echo "Unit Tests: ${{ needs.Unit-Tests.outputs.status }}" + echo "E2E Tests: ${{ needs.E2E-Tests.outputs.status }}" + echo "Code Coverage: ${{ needs.Code-Coverage.outputs.status }}" - if [[ "${{ needs.solution-build.result }}" != "success" || \ - "${{ needs.branch-name-check.result }}" != "success" || \ - "${{ needs.commitlint.result }}" != "success" || \ - "${{ needs.Unit-Tests.result }}" != "success" || \ - "${{ needs.E2E-Tests.result }}" != "success" || \ - "${{ needs.Code-Coverage.result }}" != "success" ]]; then + # Check if any job is not success (failure, cancelled, skipped) + if [[ "${{ needs.solution-build.outputs.status }}" != "success" || \ + "${{ needs.branch-name-check.outputs.status }}" != "success" || \ + "${{ needs.commitlint.outputs.status }}" != "success" || \ + "${{ needs.Unit-Tests.outputs.status }}" != "success" || \ + "${{ needs.E2E-Tests.outputs.status }}" != "success" || \ + "${{ needs.Code-Coverage.outputs.status }}" != "success" ]]; then echo "❌ One or more jobs failed." exit 1 fi - continue-on-error: false + continue-on-error: false \ No newline at end of file From 473cb332b9216048e81a33711c3b1425bbbf84d6 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 15:28:54 +0100 Subject: [PATCH 21/28] ci(reusuable-ci): script fail test --- .github/workflows/reuseable-ci-checks.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 251adf3..40f1eda 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -123,10 +123,16 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v5 with: configFile: .commitlintrc.json + + - name: Force Failure for testing script + run: dotnet build NonExistentProject.csproj + continue-on-error: ${{ inputs.runall }} + Unit-Tests: runs-on: ubuntu-latest From ba7a2b622a414eeacb633fdf6e233f13bcc8547a Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 15:35:19 +0100 Subject: [PATCH 22/28] ci(reuseable): not getting error should have --- .github/workflows/reuseable-ci-checks.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 40f1eda..d266efb 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -127,7 +127,13 @@ jobs: - uses: wagoid/commitlint-github-action@v5 with: configFile: .commitlintrc.json - + + - name: Setup .NET SDK (required for build command) + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.407' + + - name: Force Failure for testing script run: dotnet build NonExistentProject.csproj From 22c1766d1b9b276610402b11b0ec0aa6d8f8bb6e Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 15:52:26 +0100 Subject: [PATCH 23/28] ci(reuseable-ci-checks): not working --- .github/workflows/reuseable-ci-checks.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index d266efb..c54c9e1 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -94,6 +94,7 @@ jobs: branch-name-check: name: Enforce Branch Name Convention if: success() || failure() + continue-on-error: ${{ inputs.runall }} outputs: status: ${{ job.status }} runs-on: ubuntu-latest @@ -112,11 +113,12 @@ jobs: echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*" exit 1 fi - continue-on-error: ${{ inputs.runall }} + commitlint: runs-on: ubuntu-latest if: success() || failure() + continue-on-error: ${{ inputs.runall }} outputs: status: ${{ job.status }} steps: @@ -128,48 +130,51 @@ jobs: with: configFile: .commitlintrc.json - - name: Setup .NET SDK (required for build command) + - name: Setup .NET SDK (required for build command) qqqq remove me uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.407' - - name: Force Failure for testing script + - name: Force Failure for testing script qqqq remove me run: dotnet build NonExistentProject.csproj - continue-on-error: ${{ inputs.runall }} + Unit-Tests: runs-on: ubuntu-latest if: success() || failure() + continue-on-error: ${{ inputs.runall }} outputs: status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: ${{ inputs.runall }} + E2E-Tests: runs-on: ubuntu-latest if: success() || failure() + continue-on-error: ${{ inputs.runall }} outputs: status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: ${{ inputs.runall }} + Code-Coverage: runs-on: ubuntu-latest if: success() || failure() + continue-on-error: ${{ inputs.runall }} outputs: status: ${{ job.status }} steps: - name: See other project pipeline for Tests run: echo " See other project pipeline for Tests this is a placeholder" - continue-on-error: ${{ inputs.runall }} + Check-For-Fails: name: Check for failures From 1bbf550c5c22519606f3d3ff60500614dd0b1f44 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 15:56:26 +0100 Subject: [PATCH 24/28] ci(reuseable): removed deliberate error --- .github/workflows/reuseable-ci-checks.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index c54c9e1..da0c2fd 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -129,18 +129,7 @@ jobs: - uses: wagoid/commitlint-github-action@v5 with: configFile: .commitlintrc.json - - - name: Setup .NET SDK (required for build command) qqqq remove me - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.407' - - - - name: Force Failure for testing script qqqq remove me - run: dotnet build NonExistentProject.csproj - - - + Unit-Tests: runs-on: ubuntu-latest From 0c6d40f64a2f363f6ab30c719e1eeeff5c024734 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Fri, 2 May 2025 16:12:44 +0100 Subject: [PATCH 25/28] ci(release): first go to pr then master --- .github/workflows/dev.yml | 60 ++++++----------------------------- .github/workflows/release.yml | 23 ++++++++------ 2 files changed, 22 insertions(+), 61 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 14c3ba5..b63f880 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -14,7 +14,6 @@ env: # Permission GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} - # PACKAGES_TOKEN qqqq GITHUB_USERNAME: "Phil-NHS" # Nuget Set Up @@ -23,10 +22,10 @@ env: # Build Set Up USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false - + DISABLE_PACKAGE_GENERATION: false jobs: -#qqqq put back in + call-reusable-ci-checks-workflow: name: run ci checks uses: ./.github/workflows/reuseable-ci-checks.yml @@ -40,7 +39,6 @@ jobs: # Hence explicit "if" and "needs" generate-dev-semantic-version: if: success() - #needs qqqq: [commitlint, Unit-Tests, E2E-Tests, Code-Coverage, branch-name-check] needs: [call-reusable-ci-checks-workflow] runs-on: ubuntu-latest outputs: @@ -54,10 +52,6 @@ jobs: - name: Install Semantic Release Packages - #qqqq shouldnt need - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} run: | echo "Installing semantic-release packages..." npm install -D \ @@ -74,10 +68,6 @@ jobs: - name: Run Semantic Version (None Blocking) - # remove if not needed qqqq - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} run: | # If no version is required we can get an error so here we handle it set +e @@ -128,7 +118,6 @@ jobs: build-telblazor-dev-package-and-publish: if: success() - #qqqq needs: [generate-dev-semantic-version, commitlint, Unit-Tests,E2E-Tests, Code-Coverage, branch-name-check] needs: [generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest env: @@ -184,7 +173,6 @@ jobs: Make-WasmStaticClient-DevShowCase-Artifact-Trigger-GH-Pages-In-TELBlazor-DevShowCase-Repo: if: success() #not needed but being explicit - #needs qqqq: [ branch-name-check, build-telblazor-dev-package-and-publish,generate-dev-semantic-version, commitlint, Unit-Tests, E2E-Tests] needs: [build-telblazor-dev-package-and-publish, generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest env: @@ -228,26 +216,14 @@ jobs: #qqqq with recent changes can we just build the solution now if this works then check - - name: Build TELBlazor.Components.ShowCase.Shared - run: | - dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ - /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ - /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ - /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ - /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - # /p:GhPageRelease=false \ qqqq is it still a thing? - - - - -# qqqq no longer needed - # Hardcoding here the INDEPENDENT_CLIENT_GH_PAGES value - # - name: Modify appsettings.json with hardcoded value + # - name: Build TELBlazor.Components.ShowCase.Shared # run: | - # jq '.INDEPENDENT_CLIENT_GH_PAGES = "true"' TestHostPrerenderWASM/TestHostPrerenderWASM.Client/wwwroot/appsettings.json > tmp.json && mv tmp.json TestHostPrerenderWASM/TestHostPrerenderWASM.Client/wwwroot/appsettings.json - # # Print the contents of appsettings.json inside 'TestHostPrerenderWASM.Client' folder - # - name: Display appsettings.json content - # run: cat TestHostPrerenderWASM/TestHostPrerenderWASM.Client/wwwroot/appsettings.json + # dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ + # /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ + # /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ + # /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + # /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE + - name: Publish WasmStaticClient run: | @@ -256,24 +232,6 @@ jobs: /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - # qqqq no longer needed /p:GhPageRelease=true \ - - - # - name: Debug - List all files in docs folder qqqq - # run: | - # echo "Listing contents of ./docs directory" - # ls -alh ./docs - # echo "Listing contents of ./docs/wwwroot directory" - # ls -alh ./docs/wwwroot || echo "wwwroot directory not found" - # echo "Checking for bclversion.txt in ./docs" - # if [ -f "./docs/bclversion.txt" ]; then - # echo "Contents of ./docs/bclversion.txt:" - # cat ./docs/bclversion.txt - # else - # echo "bclversion.txt not found in ./docs" - # fi - - #include hidden so we get jekyll - name: Creating artifact of publish folder for test gh page workflow diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61fd1ff..8d09478 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,7 @@ env: # Build Set Up USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false + DISABLE_PACKAGE_GENERATION: false jobs: generate-semantic-version: @@ -101,7 +102,7 @@ jobs: node-version: '20' - name: Install npm packages so we have gulp for retrieving TEL Frontend Css - working-directory: ./Package.BlazorComponentLibrary + working-directory: ./TELBlazor.Components run: npm ci #CI is an install with adhering to package-lock @@ -109,8 +110,9 @@ jobs: run: | dotnet build Package.BlazorComponentLibrary -c Release \ /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ - /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH - + /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ + /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION - name: Publish to TechnologyEnhancedLearning Package run: | @@ -156,14 +158,15 @@ jobs: echo "Listing packages.lock.json files:" find . -name "packages.lock.json" -type f -print + #qqqq do we need this can we not build the package, then build the project with package build false or just build the package then the wasm proje - - name: Build TELBlazor.Components.ShowCase.Shared - run: | - dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ - /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ - /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ - /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ - /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE + # - name: Build TELBlazor.Components.ShowCase.Shared + # run: | + # dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ + # /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ + # /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ + # /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ + # /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - name: Publish WasmStaticClient From 6e0c7cddf239d64cffcb52759cd5293acbf17bd3 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Tue, 6 May 2025 09:28:11 +0100 Subject: [PATCH 26/28] ci(reuseable-ci-checks): make useable in branch checks --- .github/workflows/reuseable-ci-checks.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index da0c2fd..b97fae9 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -34,7 +34,7 @@ jobs: # Build Package # Build Solution useing package - solution-build: + reuseable-ci-checks-solution-build: name: Check Solution Builds runs-on: ubuntu-latest continue-on-error: ${{ inputs.runall }} @@ -91,7 +91,7 @@ jobs: /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION - branch-name-check: + reuseable-ci-checks-branch-name-check: name: Enforce Branch Name Convention if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -115,7 +115,7 @@ jobs: fi - commitlint: + reuseable-ci-checks-commitlint: runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -131,7 +131,7 @@ jobs: configFile: .commitlintrc.json - Unit-Tests: + reuseable-ci-checks-Unit-Tests: runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -143,7 +143,7 @@ jobs: - E2E-Tests: + reuseable-ci-checks-E2E-Tests: runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -154,7 +154,7 @@ jobs: run: echo " See other project pipeline for Tests this is a placeholder" - Code-Coverage: + reuseable-ci-checks-Code-Coverage: runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -165,7 +165,7 @@ jobs: run: echo " See other project pipeline for Tests this is a placeholder" - Check-For-Fails: + reuseable-ci-checks-Check-For-Fails: name: Check for failures if: ${{ inputs.runall }} needs: From ca70f755c6c5fbb40aacde6662c1f99aac461cd3 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Tue, 6 May 2025 09:34:14 +0100 Subject: [PATCH 27/28] ci(reuseable): make needs correct ref --- .github/workflows/reuseable-ci-checks.yml | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index b97fae9..94f5e9c 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -180,20 +180,20 @@ jobs: steps: - name: Check Job Results run: | - echo "Solution Build: ${{ needs.solution-build.outputs.status }}" - echo "Branch Name Check: ${{ needs.branch-name-check.outputs.status }}" - echo "Commitlint: ${{ needs.commitlint.outputs.status }}" - echo "Unit Tests: ${{ needs.Unit-Tests.outputs.status }}" - echo "E2E Tests: ${{ needs.E2E-Tests.outputs.status }}" - echo "Code Coverage: ${{ needs.Code-Coverage.outputs.status }}" + echo "Solution Build: ${{ needs.reuseable-ci-checks-solution-build.outputs.status }}" + echo "Branch Name Check: ${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}" + echo "Commitlint: ${{ needs.reuseable-ci-checks-commitlint.outputs.status }}" + echo "Unit Tests: ${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}" + echo "E2E Tests: ${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}" + echo "Code Coverage: ${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}" # Check if any job is not success (failure, cancelled, skipped) - if [[ "${{ needs.solution-build.outputs.status }}" != "success" || \ - "${{ needs.branch-name-check.outputs.status }}" != "success" || \ - "${{ needs.commitlint.outputs.status }}" != "success" || \ - "${{ needs.Unit-Tests.outputs.status }}" != "success" || \ - "${{ needs.E2E-Tests.outputs.status }}" != "success" || \ - "${{ needs.Code-Coverage.outputs.status }}" != "success" ]]; then + if [[ "${{ needs.reuseable-ci-checks-solution-build.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-commitlint.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}" != "success" ]]; then echo "❌ One or more jobs failed." exit 1 fi From aa5e6deda2a2646ab77fb2d34764f2f15e7ceea7 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Tue, 6 May 2025 09:50:36 +0100 Subject: [PATCH 28/28] ci(reusueable): naming --- .github/workflows/reuseable-ci-checks.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 94f5e9c..753b8d7 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -169,12 +169,12 @@ jobs: name: Check for failures if: ${{ inputs.runall }} needs: - - solution-build - - branch-name-check - - commitlint - - Unit-Tests - - E2E-Tests - - Code-Coverage + - reuseable-ci-checks-solution-build + - reuseable-ci-checks-branch-name-check + - reuseable-ci-checks-commitlint + - reuseable-ci-checks-Unit-Tests + - reuseable-ci-checks-E2E-Tests + - reuseable-ci-checks-Code-Coverage runs-on: ubuntu-latest steps: