Skip to content

Commit 4d3d9f3

Browse files
committed
fix(naming): job, step, id, env
1 parent 5107f57 commit 4d3d9f3

File tree

3 files changed

+50
-62
lines changed

3 files changed

+50
-62
lines changed

.github/workflows/dev.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
jobs:
3232

3333
call-reusable-ci-checks-workflow:
34-
name: run ci checks
34+
name: Run CI checks
3535
uses: ./.github/workflows/reuseable-ci-checks.yml
3636
with:
3737
runall: true
@@ -42,6 +42,7 @@ jobs:
4242
# We do not proceed from the point if there is a fail.
4343
# Hence explicit "if" and "needs"
4444
generate-dev-semantic-version:
45+
name: Generate dev semantic version
4546
if: success()
4647
needs: [call-reusable-ci-checks-workflow]
4748
runs-on: ubuntu-latest
@@ -55,7 +56,7 @@ jobs:
5556
fetch-depth: 0 # Required for Semantic Release to analyze commit history
5657

5758

58-
- name: Install Semantic Release Packages
59+
- name: Install semantic release packages
5960
run: |
6061
echo "Installing semantic-release packages..."
6162
npm install -D \
@@ -71,7 +72,7 @@ jobs:
7172

7273

7374

74-
- name: Run Semantic Version (None Blocking)
75+
- name: Run semantic version (None Blocking)
7576
run: |
7677
# If no version is required we can get an error so here we handle it
7778
set +e
@@ -104,8 +105,8 @@ jobs:
104105
set -e
105106
106107
107-
- name: Rename Semver Version With Date Time Dev
108-
id: set-dev-semantic-version
108+
- name: Rename Semver Version with branch date time dev
109+
id: set_dev_semantic_version
109110
run: |
110111
echo "Semantic Release Output $SEMVER_OUTPUT"
111112
@@ -121,7 +122,8 @@ jobs:
121122
122123

123124
build-telblazor-dev-package-and-publish:
124-
if: success()
125+
if: success()
126+
name: Build dev package and publish
125127
needs: [generate-dev-semantic-version, call-reusable-ci-checks-workflow]
126128
runs-on: ubuntu-latest
127129
env:
@@ -135,13 +137,13 @@ jobs:
135137
with:
136138
global-json-file: global.json
137139

138-
- name: Debug Version Output DEV_TELBLAZOR_PACKAGE_VERSION var
140+
- name: Debug version output DEV_TELBLAZOR_PACKAGE_VERSION
139141
run: echo "Extracted Version $DEV_TELBLAZOR_PACKAGE_VERSION "
140142

141143
- name: Replace local environment variable in nuget config because cant provide it as a parameter
142144
run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config
143145

144-
- name: Clean lock files because the newly generated package file will superseed the locks
146+
- name: Clean lock files because the newly generated package file will supersede the locks
145147
run: |
146148
find . -name "packages.lock.json" -type f -exec rm -f {} \;
147149
@@ -174,8 +176,8 @@ jobs:
174176
175177
176178

177-
Make-WasmStaticClient-DevShowCase-Artifact-Trigger-GH-Pages-In-TELBlazor-DevShowCase-Repo:
178-
179+
trigger-gh-pages-telblazor-devshowcase-workflow:
180+
name: Create artifact and provide it to TelBlazor-DevShowCase repo and its gh-page trigger
179181
if: success() #not needed but being explicit
180182
needs: [build-telblazor-dev-package-and-publish, generate-dev-semantic-version, call-reusable-ci-checks-workflow]
181183
runs-on: ubuntu-latest
@@ -191,7 +193,7 @@ jobs:
191193
with:
192194
global-json-file: global.json
193195

194-
- name: Clean Solution
196+
- name: Clean solution
195197
run: |
196198
echo "Cleaning the solution..."
197199
dotnet clean TELBlazor.sln
@@ -219,15 +221,6 @@ jobs:
219221
find . -name "packages.lock.json" -type f -print
220222
221223
222-
#qqqq with recent changes can we just build the solution now if this works then check
223-
# - name: Build TELBlazor.Components.ShowCase.Shared
224-
# run: |
225-
# dotnet build TELBlazor.Components.ShowCase.Shared -c Release \
226-
# /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \
227-
# /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
228-
# /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
229-
# /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE
230-
231224
232225
- name: Publish WasmStaticClient
233226
run: |
@@ -261,7 +254,7 @@ jobs:
261254
echo "Artifact URL: $ARTIFACT_URL"
262255
echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV
263256
264-
- name: Trigger Workflow in TELBlazor-DevShowCase Repository
257+
- name: Trigger workflow in TELBlazor-DevShowCase repo
265258
run: |
266259
repo_owner="TechnologyEnhancedLearning"
267260
repo_name="TELBlazor-DevShowCase"

.github/workflows/release.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ env:
2929

3030
jobs:
3131
generate-semantic-version:
32+
name: Generate semantic version for package and repo
3233
runs-on: ubuntu-latest
3334
outputs:
3435
semantic-release-version: ${{ steps.set-semantic-version.outputs.semantic-release-version }}
@@ -38,7 +39,7 @@ jobs:
3839
with:
3940
fetch-depth: 0 # required for semantic release to analyze commit history
4041

41-
- name: Install Semantic Release Packages
42+
- name: Install semantic release packages
4243
run: |
4344
echo "Installing semantic-release packages..."
4445
npm install -D \
@@ -54,8 +55,8 @@ jobs:
5455

5556

5657
#configured with .releaseseec
57-
- name: run semantic release
58-
id: set-semantic-version
58+
- name: Run semantic release
59+
id: set_semantic_version
5960
run: |
6061
set +e
6162
RELEASE_OUTPUT=$(npx semantic-release 2>&1)
@@ -95,14 +96,14 @@ jobs:
9596

9697

9798
# the restore cant be given env values to override values like it can in build so we need to remove this file so we use the env values
98-
- name: Remove Local PackageSettings (CI Only)
99+
- name: Remove local package settings (CI Only)
99100
run: rm -f PackageSettings.props.local
100101

101102

102103
- name: Replace local environment variable in nuget config because cant provide it as a parameter
103104
run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config
104105

105-
- name: Clean lock files because the newly generated package file will superseed the locks
106+
- name: Clean lock files because the newly generated package file will supersede the locks
106107
run: |
107108
find . -name "packages.lock.json" -type f -exec rm -f {} \;
108109
@@ -117,15 +118,15 @@ jobs:
117118
run: npm ci
118119
#CI is an install with adhering to package-lock
119120

120-
- name: Build and Pack BlazorComponentLibrary
121+
- name: Build and pack TELBlazor.Components
121122
run: |
122-
dotnet build Package.BlazorComponentLibrary -c Release \
123+
dotnet build TELBlazor.Components -c Release \
123124
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
124125
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
125126
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
126127
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION
127128
128-
- name: Publish to TechnologyEnhancedLearning Package
129+
- name: Publish to TELBlazor.Components Package
129130
run: |
130131
dotnet nuget push "$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH/TELBlazor.Components.*.nupkg" \
131132
--source "$TELBLAZOR_PACKAGE_SOURCE" \
@@ -134,7 +135,8 @@ jobs:
134135
135136
136137
137-
Update-gh-pages-site:
138+
update-gh-pages-site:
139+
name: Update the production TELBlazor ShowCase page (on this repo)
138140
needs: [build-telblazor-package-and-publish, generate-semantic-version]
139141
runs-on: ubuntu-latest
140142
if: ${{ needs.generate-semantic-version.outputs.semantic-release-version != '' }} # Only run if there's a version
@@ -149,7 +151,7 @@ jobs:
149151
with:
150152
global-json-file: global.json
151153

152-
- name: Remove Local PackageSettings (CI Only)
154+
- name: Remove local packagesettings (CI Only)
153155
run: rm -f PackageSettings.props.local
154156

155157
- name: Replace local environment variable in nuget config because cant provide it as a parameter
@@ -159,7 +161,7 @@ jobs:
159161
sed -i "s|%GITHUB_PACKAGES_TOKEN%|$PACKAGES_TOKEN |g" nuget.config
160162
161163

162-
- name: Clean lock files because the newly generated package file will superseed the locks
164+
- name: Clean lock files because the newly generated package file will supersede the locks
163165
run: |
164166
echo "Listing packages.lock.json files:"
165167
find . -name "packages.lock.json" -type f -print
@@ -170,26 +172,15 @@ jobs:
170172
echo "Listing packages.lock.json files:"
171173
find . -name "packages.lock.json" -type f -print
172174
173-
#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
174-
# - name: Build TELBlazor.Components.ShowCase.Shared
175-
# run: |
176-
# dotnet build TELBlazor.Components.ShowCase.Shared -c Release \
177-
# /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
178-
# /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
179-
# /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
180-
# /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE
181-
182-
183-
- name: Publish WasmStaticClient
175+
176+
- name: Publish WasmStaticClient TELBlazor ShowCase
184177
run: |
185178
dotnet publish ./TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \
186179
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
187180
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
188181
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
189182
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE
190183
191-
192-
# No this will be in the release branch that we do a prod wiki host
193184
- name: Deploy to GitHub Pages
194185
uses: JamesIves/github-pages-deploy-action@v4
195186
with:

.github/workflows/reuseable-ci-checks.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# Build Package
3636
# Build Solution useing package
3737
reuseable-ci-checks-solution-build:
38-
name: Check Solution Builds
38+
name: Check solution builds
3939
runs-on: ubuntu-latest
4040
continue-on-error: ${{ inputs.runall }}
4141
outputs:
@@ -66,7 +66,7 @@ jobs:
6666
working-directory: ./TELBlazor.Components
6767
run: npm ci
6868

69-
- name: Build and Create Package locally
69+
- name: Build and create package locally
7070
env:
7171
#Overwrite package generation
7272
DISABLE_PACKAGE_GENERATION: false
@@ -78,7 +78,7 @@ jobs:
7878
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \
7979
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION
8080
81-
- name: Build Solution without generating new package
81+
- name: Build solution without generating new package
8282
env:
8383
#Overwrite package generation
8484
DISABLE_PACKAGE_GENERATION: true
@@ -92,7 +92,7 @@ jobs:
9292
9393
9494
reuseable-ci-checks-branch-name-check:
95-
name: Enforce Branch Name Convention
95+
name: Check branch names
9696
if: success() || failure()
9797
continue-on-error: ${{ inputs.runall }}
9898
outputs:
@@ -116,6 +116,7 @@ jobs:
116116
117117

118118
reuseable-ci-checks-commitlint:
119+
name: Check commit names
119120
runs-on: ubuntu-latest
120121
if: success() || failure()
121122
continue-on-error: ${{ inputs.runall }}
@@ -131,7 +132,8 @@ jobs:
131132
configFile: .commitlintrc.json
132133

133134

134-
reuseable-ci-checks-Unit-Tests:
135+
reuseable-ci-checks-unit-tests:
136+
name: Unit test components
135137
runs-on: ubuntu-latest
136138
if: success() || failure()
137139
continue-on-error: ${{ inputs.runall }}
@@ -143,7 +145,8 @@ jobs:
143145

144146

145147

146-
reuseable-ci-checks-E2E-Tests:
148+
reuseable-ci-checks-e2e-tests:
149+
name: Check with end to end testing including nojs
147150
runs-on: ubuntu-latest
148151
if: success() || failure()
149152
continue-on-error: ${{ inputs.runall }}
@@ -154,7 +157,8 @@ jobs:
154157
run: echo " See other project pipeline for Tests this is a placeholder"
155158

156159

157-
reuseable-ci-checks-Code-Coverage:
160+
reuseable-ci-checks-code-coverage:
161+
name: Check for code coverage
158162
runs-on: ubuntu-latest
159163
if: success() || failure()
160164
continue-on-error: ${{ inputs.runall }}
@@ -165,16 +169,16 @@ jobs:
165169
run: echo " See other project pipeline for Tests this is a placeholder"
166170

167171

168-
reuseable-ci-checks-Check-For-Fails:
172+
reuseable-ci-checks-check-for-failed-jobs:
169173
name: Check for failures
170174
if: ${{ inputs.runall }}
171175
needs:
172176
- reuseable-ci-checks-solution-build
173177
- reuseable-ci-checks-branch-name-check
174178
- reuseable-ci-checks-commitlint
175-
- reuseable-ci-checks-Unit-Tests
176-
- reuseable-ci-checks-E2E-Tests
177-
- reuseable-ci-checks-Code-Coverage
179+
- reuseable-ci-checks-unit-tests
180+
- reuseable-ci-checks-e2e-tests
181+
- reuseable-ci-checks-code-coverage
178182

179183
runs-on: ubuntu-latest
180184
steps:
@@ -183,17 +187,17 @@ jobs:
183187
echo "Solution Build: ${{ needs.reuseable-ci-checks-solution-build.outputs.status }}"
184188
echo "Branch Name Check: ${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}"
185189
echo "Commitlint: ${{ needs.reuseable-ci-checks-commitlint.outputs.status }}"
186-
echo "Unit Tests: ${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}"
187-
echo "E2E Tests: ${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}"
188-
echo "Code Coverage: ${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}"
190+
echo "Unit Tests: ${{ needs.reuseable-ci-checks-unit-tests.outputs.status }}"
191+
echo "E2E Tests: ${{ needs.reuseable-ci-checks-e2e-tests.outputs.status }}"
192+
echo "Code Coverage: ${{ needs.reuseable-ci-checks-code-coverage.outputs.status }}"
189193
190194
# Check if any job is not success (failure, cancelled, skipped)
191195
if [[ "${{ needs.reuseable-ci-checks-solution-build.outputs.status }}" != "success" || \
192196
"${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}" != "success" || \
193197
"${{ needs.reuseable-ci-checks-commitlint.outputs.status }}" != "success" || \
194-
"${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}" != "success" || \
195-
"${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}" != "success" || \
196-
"${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}" != "success" ]]; then
198+
"${{ needs.reuseable-ci-checks-unit-tests.outputs.status }}" != "success" || \
199+
"${{ needs.reuseable-ci-checks-e2e-tests.outputs.status }}" != "success" || \
200+
"${{ needs.reuseable-ci-checks-code-coverage.outputs.status }}" != "success" ]]; then
197201
echo "❌ One or more jobs failed."
198202
exit 1
199203
fi

0 commit comments

Comments
 (0)