Skip to content

Commit 790b1ae

Browse files
authored
Merge pull request #115 from TechnologyEnhancedLearning/refactor-optimisations
chore(cicd): trying again to trigger cicd
2 parents ea7cbe5 + 1fbdeaa commit 790b1ae

File tree

3 files changed

+43
-101
lines changed

3 files changed

+43
-101
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### JIRA/RoadMap
44
_Provide your ticket number
55
[TD-####](https://hee-tis.atlassian.net/browse/TD-####)
6-
[Git Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)[Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)
6+
[Git Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)
77
[Git Ticket](https://github.com/TechnologyEnhancedLearning/TELBlazor/issues/42)
88

99
### Description
@@ -20,27 +20,39 @@ _Paste screenshots for all views created or changed: mobile, tablet and desktop,
2020

2121
### Linked package consumer tasks
2222
[TD-####](https://hee-tis.atlassian.net/browse/TD-####)
23-
[ ] Consumers also need to update nhsuk css dependency to : __put_required_nhsuk_semantic_version_here__
23+
- [ ] Consumers also need to update nhsuk css dependency to : __put_required_nhsuk_semantic_version_here__
2424

2525
### Logging
2626
_Provide description of any component scoped logging or specific level logging to check
2727

2828
### Performance comparison
2929

30-
Complete the below comparison table to check for any concerning changes in performance.
30+
- [ ] Check performance and tick the box. Or complete the table or just a note for the relevant row.
3131

32-
Use **Incognito** mode and **disable cache** in the Network tab to get a cold load comparison.
32+
33+
34+
Use two browsers both **Incognito** mode and **disable cache** in the Network tab to get a cold load comparison for
35+
[Dev showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) for your package version.
36+
[Prod showcase](https://technologyenhancedlearning.github.io/TELBlazor/) for a comparison of the change.
37+
38+
39+
**Open Incognito Browsers**
40+
1. Open the Developer Tools (F12 or Ctrl+Shift+I)
41+
1. Go to networking
42+
1. Clear log
43+
1. record
44+
1. Disable cache
45+
1. Then go to lighthouse tab
3346

3447
**Lighthouse**
3548

36-
1. Open the Developer Tools (F12 or Ctrl+Shift+I).
37-
2. Go to the **Lighthouse** tab.
38-
3. Deselect the "SEO" category.
39-
4. Select "Desktop" for the device.
40-
5. Choose "Navigation (Analyze page load)".
41-
6. Click "Analyze page load" and wait for the results.
49+
1. Go to the **Lighthouse** tab.
50+
1. Deselect the "SEO" category.
51+
1. Select "Desktop" for the device.
52+
1. Choose "Navigation (Analyze page load)".
53+
1. Click "Analyze page load" and wait for the results.
4254

43-
Here's an example of what to look for and compare:
55+
Record in the table, or compare for change:
4456

4557
* **First Contentful Paint**: The time it takes for the first text or image to appear. A lower value is better.
4658
* **Speed Index**: How quickly content is visually displayed during page load. A lower value is better.
@@ -50,26 +62,23 @@ Here's an example of what to look for and compare:
5062
**Network**
5163

5264
1. Go to the **Network** tab.
53-
2. Ensure **"Disable cache"** is checked.
54-
3. **Clear** the log.
55-
4. **Preserve log** can be checked to maintain a history of requests.
56-
5. Perform a hard reload (Ctrl+Shift+R or Cmd+Shift+R).
57-
6. Copy and paste the bottom line of the log to get the following metrics:
65+
1. Copy and paste the bottom line of the log to get the following metrics:
5866

67+
Record in the table, or compare for change:
5968
* **Requests**: The total number of requests made.
6069
* **Transferred**: The compressed size of all transferred resources.
6170
* **Resources**: The total uncompressed size of all resources.
6271
* **Finish**: The time from the request initiation to the completion of the last response.
6372

6473
You can also use the `.wasm` filter in the Network tab to inspect the sizes of individual WebAssembly files.
6574

66-
---
67-
68-
### Comparison Table
75+
**Wave Test**
76+
1. Right click page with WAVE plugin installed and run wave
77+
1. Check component is WCAG AAA navigate to component page
6978

7079
Please fill in the table below with the values from both the Dev and Prod environments.
7180
*or just check the values if its quicker and make sure to highlight anything concerning*
72-
| Measure | [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) | [Prod](https://technologyenhancedlearning.github.io/TELBlazor/) | Notes (E.g. Significant change) |
81+
| Measure | [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) | [Prod](https://technologyenhancedlearning.github.io/TELBlazor/) | Notes |
7382
| :--- | :--- | :--- | :--- |
7483
| **Lighthouse Performance Score** | | | |
7584
| **Lighthouse Accessibility Score** | | | |
@@ -82,47 +91,46 @@ Please fill in the table below with the values from both the Dev and Prod enviro
8291
| **Resources (Full App Weight)** | | | |
8392
| **Requests** | | | |
8493
| **Finish Time** | | | |
94+
| **WCAG AAA** | | | |
8595

8696

8797
-----
8898
### Developer checks
8999
(Leave tasks unticked if they haven't been appropriate for your ticket.)
90100

91101
I have:
92-
- [ ] Provided showcase example of component if applicable
93-
- [ ] Added appropriate logging and scopped logging reporting in appsettings for component if applicable
102+
- [ ] Provided showcase example of component
103+
- [ ] Added appropriate logging and scoped logging reporting in appsettings for component if applicable
94104
- [ ] Updated readme documentation
95105
- [ ] Updated showcase documentation for component
96-
- [ ] I have locally run tests against a local package (not just using project reference)
97106
- [ ] Used a browser set to No Js before using it to locally run and test changes (recommend brave as second browser)
98107
- [ ] Written Unit tests with accesibility syntax
99108
- [ ] Written E2E tests with accesibility syntax and accessibility test
100109
- [ ] Tested components with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related). Addressed any valid accessibility issues and documented any invalid errors
101-
- [ ] [Check code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/) or locally with local report generation
110+
- [ ] Check code coverage [Dev pipeline report page](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/) or locally with local report generation. (Focus on new area)
102111
- [ ] Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the PR and need to be tested to ensure nothing is broken
103112
- [ ] Tested in [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) (including logging by using log level switcher)
104113
- [ ] Scanned over my pull request and commented with any useful explanations/questions to reviewers
105114
- [ ] Scanned over cicd warnings relating to the component or area of code I have worked on (give the general ones a look too but antyhing in OptionalImplementations/Test can be ignored)
106-
- [ ] Maybe? Audit NuGet packages; use lightweight ones (e.g., System.Text.Json); ensure third-party components support trimming.
107-
- [ ] Scanned in visual studio build info messages about improving code for new code
108-
- [ ]
115+
- [ ] Auditted new NuGet packages prefering lightweight ones (e.g., System.Text.Json) and ensuring third-party components support trimming.
116+
- [ ] Looked at build messages specifically for new code.
117+
109118
---
110119
### Peer Reviewers and Assignee checks before Approval
111120
- [ ] Feedback has been provided
112-
- [ ] Project has been run locally (you can provide pr feedback via vs if desired)
121+
- [ ] Project has been run locally
113122
- [ ] Locally checked in browser set to No Js from before load (recommend Brave with no js settings)
114123
- [ ] [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) was checked and it was checked the package number matched the PR
115124
- [ ] In Dev Showcase checked against different logging levels if applicable (use log level switcher to change level)
116125
- [ ] All conversations have been responded to (emoji will do) and marked resolved
117126
- [ ] Out of scope code observations have been recorded to inform future tasks
118127
- [ ] Common questions / Architectural explanations decisions from PR documented
119-
- [ ] [Check code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/)
120-
- [ ] Should E2E or Unit test have been added
121-
- [ ] If the published dev package is linked and used in tandom with a package consumer task is it working locally (Not a hard requirement but useful in case changes required)
128+
- [ ] Checked [code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/)
129+
- [ ] Checked not missing E2E or Unit tests
130+
- [ ] Linked task for the consumption of the new component has been given a link to the dev package to help development.
122131
- [ ] Checked component readme in Showcase
123132

124133
---
125134
### Post PR Intentions and Actions
126-
- [ ] On merge will someone check [Prod Showcase](https://technologyenhancedlearning.github.io/TELBlazor/)
127-
- [ ] Tick yes if consuming projects need a version bump and/or code changes to take advantage of new components etc
128-
- [ ] If there is a linked consuming project task has the task assignee, or task been updated to know the package is available as a dev/prod version and been provided the version number.
135+
- Check [Prod Showcase](https://technologyenhancedlearning.github.io/TELBlazor/)
136+
- If prod bumps the version share that the consuming projects should update to the nevew version.

.github/workflows/dev.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,10 @@ jobs:
8989
id: detect_semantic_version
9090
run: |
9191
92-
#set +e
93-
# Due to dry-run need to catch error differently : SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1) || STATUS=$?
9492
echo "running semantic-release"
9593
SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1)
9694
STATUS=$?
9795
echo "status = $STATUS"
98-
#set -e
9996
echo "$SEMVER_OUTPUT_RAW"
10097
10198
# Get fallback version by grabbing the git tag dropping the first character, the "v", or use hardcoded fallback
@@ -105,7 +102,6 @@ jobs:
105102
set +e
106103
# Check what's in the output
107104
GREP_NO_CHANGES=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'There are no relevant changes' && echo "true" || echo "false")
108-
# qqqq GREP_WOULD_PUBLISH=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'Dry run: would publish version' && echo "true" || echo "false")
109105
GREP_WOULD_PUBLISH=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'Published release' && echo "true" || echo "false")
110106
echo "GREP_NO_CHANGES=$GREP_NO_CHANGES"
111107
echo "GREP_WOULD_PUBLISH=$GREP_WOULD_PUBLISH"
@@ -117,7 +113,6 @@ jobs:
117113
echo "No relevant changes found - DEV_SEMVER_VERSION=$DEV_SEMVER_VERSION"
118114
echo "DEV_SEMVER_VERSION=$DEV_SEMVER_VERSION" >> $GITHUB_ENV
119115
# Check if version bump expected
120-
# qqqq elif echo "$SEMVER_OUTPUT_RAW" | grep -q 'Dry run: would publish version'; then
121116
elif echo "$SEMVER_OUTPUT_RAW" | grep -q 'Published release'; then
122117
# Extract the actual version
123118
DEV_SEMVER_VERSION=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Published release \K[^\s]+' || echo "extract-failed")
@@ -349,7 +344,6 @@ jobs:
349344
# Echo the artifact URL to confirm
350345
echo "Artifact URL: $ARTIFACT_URL"
351346
echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV
352-
353347
354348
- name: Trigger workflow in TELBlazor-DevShowCase repo
355349
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -85,67 +85,7 @@ jobs:
8585
exit 1
8686
fi
8787
88-
89-
# 0 not exclusively due to no version bump so check output
90-
# if [ "${STATUS:-0}" -ne 0 ]; then
91-
# echo "Status code is not 0"
92-
# if echo "$SEMVER_OUTPUT_RAW" | grep -q "No release published"; then
93-
# echo "no version change detected"
94-
# # No new version, but we can find the current version
95-
# #echo "No new version required getting current version from git tags"
96-
# #SEMVER_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0-version-placeholder") # last git tag
97-
# echo "semantic-release-version=$SEMVER_VERSION"
98-
# SEMVER_CHANGED=false
99-
# echo "Changes do not warrant a version change. gh_pages and packages won't be updated."
100-
# #echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT
101-
# echo "semantic-version-change-required=$SEMVER_CHANGED" >> $GITHUB_OUTPUT
102-
# exit 0 # treat as success code didnt fail there just was no version increment required
103-
# else
104-
# echo "exit using status outcome of semver"
105-
# exit $STATUS # real error → fail pipeline
106-
# fi
107-
# else
108-
# echo "grep semver version"
109-
# SEMVER_VERSION=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Published release \K[\d.]+')
110-
# echo "semantic-release-version=$SEMVER_VERSION"
111-
# # qqqq VERSION=$(echo "$OUTPUT" | grep "Published release" | awk '{print $NF}') - AI suggestion try if issues
112-
# # awk is a text-processing tool that splits each line into fields using whitespace by default.
113-
# # $NF is a special variable in awk that means “the last field” of the current line.
114-
# # print $NF prints just that last field.
115-
# SEMVER_CHANGED=true
116-
# echo "semantic-version-change-required=$SEMVER_CHANGED"
117-
# echo "version change required true"
118-
# echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT
119-
# echo "semantic-version-change-required=$SEMVER_CHANGED" >> $GITHUB_OUTPUT
120-
# # Just because weve been handling errors
121-
# exit 0
122-
# fi
123-
124-
#configured with .releaseserc
125-
# qqqq- name: Run semantic release
126-
# id: set_semantic_version
127-
# run: |
128-
# set +e
129-
# RELEASE_OUTPUT=$(npx semantic-release 2>&1)
130-
# echo "$RELEASE_OUTPUT"
131-
132-
# # Try to extract the version from the full output
133-
# SEMVER_VERSION=$(echo "$RELEASE_OUTPUT" | grep -oP 'Published release \K[\d.]+')
134-
135-
# # Output it clearly for debugging
136-
# echo "Parsed semantic-release version: $SEMVER_VERSION"
137-
138-
# # Set GitHub Action output
139-
# echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT
140-
141-
# # Check if SEMVER_VERSION is empty and echo the message if so
142-
# if [ -z "$SEMVER_VERSION" ]; then
143-
# echo "Changes do not warrant a version change. gh_pages and packages won't be updated."
144-
# fi
145-
# set -e
146-
147-
148-
88+
14989
build-telblazor-package-and-publish:
15090
needs: [generate-semantic-version]
15191
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)