Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gh): publish test reports #972

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/springwolf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
types: [ opened, synchronize, ready_for_review ]
workflow_dispatch:

permissions:
contents: read
checks: write
id-token: write

jobs:
build:

Expand All @@ -32,6 +37,13 @@ jobs:
- name: Run build, check, analyzeDependencies
run: ./gradlew -p springwolf-core build

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
check_name: test-core
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Publish package
if: github.ref == 'refs/heads/master'
run: ./gradlew -p springwolf-core publish
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/springwolf-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
types: [ opened, synchronize, ready_for_review ]
workflow_dispatch:

permissions:
contents: read
checks: write
id-token: write

jobs:
build:

Expand Down Expand Up @@ -53,14 +58,22 @@ jobs:
- name: Run build, check, analyzeDependencies on example
run: ./gradlew -p ${{ env.example }} build

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
check_name: test-${{ matrix.plugin }}-junit
require_tests: true
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Run e2e tests
run: ./gradlew -p springwolf-examples/e2e npm_run_test
env:
SPRINGWOLF_EXAMPLE: ${{ matrix.plugin }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.plugin }}
name: test-${{ matrix.plugin }}-playwright
path: springwolf-examples/e2e/playwright-report/
retention-days: 14

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/springwolf-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
types: [ opened, synchronize, ready_for_review ]
workflow_dispatch:

permissions:
contents: read
checks: write
id-token: write

env:
project: springwolf-ui

Expand All @@ -34,6 +39,12 @@ jobs:

- name: Test
run: ./gradlew -p ${{ env.project }} npm_run_test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
check_name: test-ui-jest
report_paths: '**/build/test-results/test/*.xml'

- name: Build
run: ./gradlew -p ${{ env.project }} build
Expand Down
4 changes: 4 additions & 0 deletions springwolf-ui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const esModules = ['@angular', 'jsonpath-plus', '@stoplight', 'nimma', 'prism-co

const config = {
preset: 'jest-preset-angular',
reporters: [
"default",
"jest-junit"
],
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
"modulePathIgnorePatterns": [
"<rootDir>/build/"
Expand Down
34 changes: 34 additions & 0 deletions springwolf-ui/package-lock.json

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

9 changes: 9 additions & 0 deletions springwolf-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@
"angular-in-memory-web-api": "^0.18.0",
"esbuild": "^0.23.1",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-preset-angular": "^14.2.2",
"typescript": "^5.5.4"
},
"jest-junit": {
"ancestorSeparator": " › ",
"outputDirectory": "build/test-results/test",
"uniqueOutputName": "false",
"suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}",
"titleTemplate": "{title}"
}
}
Loading