diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c501240..b63f880 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -13,7 +13,7 @@ env: # Permission GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }} + PACKAGES_TOKEN: ${{ secrets.NUGETKEY }} GITHUB_USERNAME: "Phil-NHS" # Nuget Set Up @@ -22,88 +22,16 @@ 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 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. @@ -111,7 +39,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: [call-reusable-ci-checks-workflow] runs-on: ubuntu-latest outputs: dev-package-version: ${{ steps.set-dev-semantic-version.outputs.dev-semantic-version }} @@ -124,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 \ @@ -144,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 @@ -169,6 +89,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 @@ -193,7 +118,7 @@ jobs: build-telblazor-dev-package-and-publish: if: success() - 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 }} @@ -226,12 +151,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: | @@ -245,12 +173,11 @@ 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: [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 @@ -289,64 +216,47 @@ jobs: #qqqq with recent changes can we just build the solution now if this works then check - - name: Build Shared Pages - run: | - dotnet build SharedPages -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: | - 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=$DEV_TELBLAZOR_PACKAGE_VERSION \ /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 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 ./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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c11404..8d09478 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 @@ -22,7 +21,7 @@ env: # Build Set Up USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE: false - + DISABLE_PACKAGE_GENERATION: false jobs: generate-semantic-version: @@ -36,10 +35,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 +47,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 + + #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.]+') @@ -118,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 @@ -126,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: | @@ -173,19 +158,20 @@ jobs: echo "Listing packages.lock.json files:" find . -name "packages.lock.json" -type f -print - - - name: Build Shared Pages - run: | - dotnet build SharedPages -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 + + #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: 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 385db4d..753b8d7 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: @@ -11,105 +9,192 @@ 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 - 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" + + # Build Package + # Build Solution useing package + reuseable-ci-checks-solution-build: + 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' - 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" + - 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 + 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 - 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 }} + reuseable-ci-checks-branch-name-check: + name: Enforce Branch Name Convention + if: success() || failure() + continue-on-error: ${{ inputs.runall }} + outputs: + status: ${{ job.status }} + 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 - Unit-Tests: - name: PR Check Unit Tests + + reuseable-ci-checks-commitlint: 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 }} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: wagoid/commitlint-github-action@v5 + with: + configFile: .commitlintrc.json + + + reuseable-ci-checks-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" + + - 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 }} + reuseable-ci-checks-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" + + + reuseable-ci-checks-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" + - 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 + reuseable-ci-checks-Check-For-Fails: + name: Check for failures + if: ${{ inputs.runall }} + needs: + - 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: - - 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 }}" + runs-on: ubuntu-latest + steps: + - name: Check Job Results + run: | + 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 }}" - 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 + # Check if any job is not success (failure, cancelled, skipped) + 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 + continue-on-error: false \ No newline at end of file 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 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/README.md b/README.md index c47bd27..ae08750 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,19 @@ 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 +[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/) diff --git a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj index bd98777..22dca2d 100644 --- a/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj +++ b/TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj @@ -5,13 +5,29 @@ enable enable - $(MSBuildProjectDirectory)\..\..\docs\ + $(MSBuildProjectDirectory)\..\docs\ + $(PublishDir)\wwwroot\ - + + + + + + + + + + + + + diff --git a/nuget.config b/nuget.config index 7a52896..379e4fb 100644 --- a/nuget.config +++ b/nuget.config @@ -16,7 +16,7 @@ - +