Skip to content

Commit

Permalink
Added windows testing edge launcher and github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnettwilliam committed Mar 11, 2024
1 parent c24c215 commit 7501674
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,58 @@ jobs:
- name: Output coverage to summary
if: success() || failure() && steps.run-unit-tests.outcome == 'success'
run: cat ./platform/reports/SummaryGithub.md >> $GITHUB_STEP_SUMMARY


build-win:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup node 18
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install node dependencies
run: |
npm ci
npm install -g karma-cli
- name: Build the education platform
id: build-platform
if: success() || failure()
run: npm run build --workspaces

- name: Run the unit tests
id: run-unit-tests
if: success() || failure() && steps.build-platform.outcome == 'success'
run: npm test --workspaces -- --browsers EdgeHeadless

- name: Create test report
uses: dorny/test-reporter@v1
if: success() || failure() && steps.run-unit-tests.outcome == 'success'
with:
name: Unit Test Results - win
path: platform/reports/TESTS*.xml
reporter: java-junit
fail-on-error: true

- name: Setup .NET Core - for coverage report # Required to execute ReportGenerator
uses: actions/setup-dotnet@v4
if: success() || failure() && steps.run-unit-tests.outcome == 'success'
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Create coverage md report
uses: danielpalme/[email protected]
if: success() || failure() && steps.run-unit-tests.outcome == 'success'
with:
reports: ./platform/reports/coverage-report.xml
targetdir: ./platform/reports/
reporttypes: MarkdownSummaryGithub

- name: Output coverage to summary
if: success() || failure() && steps.run-unit-tests.outcome == 'success'
run: cat ./platform/reports/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
22 changes: 21 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions platform/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = function(config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require("karma-firefox-launcher"),
require("karma-edgium-launcher"),
require("karma-safarinative-launcher"),
require('karma-jasmine-html-reporter'),
require('karma-junit-reporter')
Expand Down
1 change: 1 addition & 0 deletions platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.1",
"karma-edgium-launcher": "^4.0.0-0",
"karma-firefox-launcher": "^2.1.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
Expand Down

0 comments on commit 7501674

Please sign in to comment.