Skip to content

Commit f83fa0d

Browse files
committed
feat(button): e2e cicd
1 parent 8890eda commit f83fa0d

File tree

1 file changed

+61
-14
lines changed

1 file changed

+61
-14
lines changed

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

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135

136136
reuseable-ci-checks-unit-tests:
137137
name: Unit test components
138+
timeout-minutes: 60
138139
runs-on: ubuntu-latest
139140
if: success() || failure()
140141
continue-on-error: ${{ inputs.runall }}
@@ -196,13 +197,7 @@ jobs:
196197
working-directory: "./TELBlazor.Components.UnitTests"
197198
env:
198199
ASPNETCORE_ENVIRONMENT: ci
199-
200-
# - name: Run bUnit tests
201-
# run: dotnet test Package.Shared.BlazorComponents.UnitTests.csproj --no-build --verbosity minimal
202-
# working-directory: Package.Shared.BlazorComponents.UnitTests
203-
204-
205-
200+
206201

207202
reuseable-ci-checks-e2e-tests:
208203
name: Check with end to end testing including nojs
@@ -213,15 +208,67 @@ jobs:
213208
outputs:
214209
status: ${{ job.status }}
215210
steps:
216-
- name: See other project pipeline for Tests
217-
run: echo " See other project pipeline for Tests this is a placeholder"
211+
- name: Checkout code
212+
uses: actions/checkout@v3
213+
214+
- name: Setup .NET
215+
uses: actions/setup-dotnet@v4
216+
with:
217+
global-json-file: global.json
218+
219+
- name: Replace local environment variable in nuget config because cant provide it as a parameter
220+
run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config
221+
222+
- name: Clean lock files because the newly generated package file will superseed the locks
223+
run: |
224+
find . -name "packages.lock.json" -type f -exec rm -f {} \;
225+
226+
- name: Set up Node.js so we have gulp for retrieving TEL Frontend Css
227+
uses: actions/setup-node@v4
228+
with:
229+
node-version: '20'
230+
231+
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
232+
working-directory: ./TELBlazor.Components
233+
run: npm ci
234+
235+
- name: Build and create package locally
236+
env:
237+
#Overwrite package generation
238+
DISABLE_PACKAGE_GENERATION: false
239+
run: |
240+
dotnet build TELBlazor.Components -c Debug \
241+
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
242+
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
243+
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
244+
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \
245+
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION \
246+
/p:E2ETracingEnabled=$E2E_TRACING_ENABLED
247+
248+
- name: Build solution without generating new package
249+
env:
250+
#Overwrite package generation
251+
DISABLE_PACKAGE_GENERATION: true
252+
run: |
253+
dotnet build TELBlazor.sln -c Debug \
254+
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
255+
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
256+
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
257+
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \
258+
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION \
259+
/p:E2ETracingEnabled=$E2E_TRACING_ENABLED
260+
261+
262+
- name: Ensure browsers are installed
263+
run: pwsh TELBlazor.Components.ShowCase.E2ETests/bin/Debug/net8.0/playwright.ps1 install --with-deps
218264

219-
# - name: Ensure browsers are installed
220-
# run: pwsh Test.BrowserBased.UnitE2ETests/bin/Debug/net8.0/playwright.ps1 install --with-deps
265+
- name: E2E tests excepted filtered
266+
run: dotnet test --filter "Category!=LocalOnly & Category!=HeadlessFalse" TELBlazor.Components.ShowCase.E2ETests.csproj --no-restore --verbosity minimal
267+
working-directory: ./TELBlazor.Components.ShowCase.E2ETests
268+
env:
269+
ASPNETCORE_ENVIRONMENT: ci
270+
221271

222-
# - name: Playwright test run excepted filtered
223-
# run: dotnet test --filter "Category!=LocalOnly & Category!=HeadlessFalse" Test.BrowserBased.UnitE2ETests.csproj --no-restore --verbosity minimal
224-
# working-directory: Test.BrowserBased.UnitE2ETests
225272

226273
reuseable-ci-checks-code-coverage:
227274
name: Check for code coverage

0 commit comments

Comments
 (0)