Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Generate coverage summary
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: 'dist/coverage/*/cobertura-coverage.xml'
filename: 'coverage/*/cobertura-coverage.xml'
badge: true
format: markdown
output: both
Expand All @@ -93,15 +93,15 @@ jobs:
# Extract coverage percentage from markdown and create JSON badge
TOTAL_COVERAGE=$(grep -E "(Summary|Total)" code-coverage-results.md | grep -oE '[0-9]+(\.[0-9]+)?%' | head -1 | sed 's/%//')
echo "Extracted coverage: $TOTAL_COVERAGE%"
echo "{\"schemaVersion\": 1, \"label\": \"coverage\", \"message\": \"$TOTAL_COVERAGE%\", \"color\": \"brightgreen\"}" > dist/coverage/coverage-summary.json
echo "{\"schemaVersion\": 1, \"label\": \"coverage\", \"message\": \"$TOTAL_COVERAGE%\", \"color\": \"brightgreen\"}" > coverage/coverage-summary.json
- name: Extract coverage badge
run: |
# Extract only the badge line and total coverage line
head -n 2 code-coverage-results.md > dist/coverage/coverage-badge.md
head -n 2 code-coverage-results.md > coverage/coverage-badge.md
- uses: actions/upload-artifact@v7
with:
name: coverage-reports
path: dist/coverage
path: coverage
retention-days: 30

verification:
Expand Down
42 changes: 21 additions & 21 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,17 @@
"tsConfig": "projects/element-ng/tsconfig.spec.json",
"buildTarget": "element-ng:test-target",
"browsers": ["chromium"],
"browserViewport": "1280x720",
"browserViewport": "1024x768",
"exclude": ["schematics/**"],
"runnerConfig": true,
"coverageThresholds": {
"statements": 85,
"branches": 70,
"functions": 85,
"lines": 85
"lines": 80
},
"coverageExclude": ["**/*.module.ts", "**/testing/**/*.ts"],
"coverageReporters": ["cobertura"]
"coverageExclude": ["**/index.ts", "**/*.module.ts", "**/testing/**/*.ts"],
"coverageReporters": ["cobertura", "html"]
}
},
"lint": {
Expand All @@ -204,19 +204,16 @@
"project": "projects/element-translate-ng/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/element-translate-ng/tsconfig.lib.json"
},
"development": {
"tsConfig": "projects/element-translate-ng/tsconfig.lib.json"
}
"development": {}
}
},
"test": {
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "projects/element-translate-ng/tsconfig.spec.json",
"browsers": ["chromium"]
"browsers": ["chromium"],
"coverageExclude": ["**/*.module.ts", "**/*.d.ts", "**/*.mock.ts", "public-api.ts"],
"coverageReporters": ["cobertura", "html", "text"]
}
},
"lint": {
Expand Down Expand Up @@ -276,7 +273,9 @@
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "projects/charts-ng/tsconfig.spec.json",
"browsers": ["chromium"]
"browsers": ["chromium"],
"coverageExclude": ["**/*.module.ts", "docs.ts", "public-api.ts"],
"coverageReporters": ["cobertura", "html", "text"]
}
},
"lint": {
Expand Down Expand Up @@ -308,7 +307,9 @@
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "projects/native-charts-ng/tsconfig.spec.json",
"browsers": ["chromium"]
"browsers": ["chromium"],
"coverageExclude": ["**/index.ts", "**/*.module.ts", "docs.ts", "public-api.ts"],
"coverageReporters": ["cobertura", "html", "text"]
}
},
"lint": {
Expand Down Expand Up @@ -336,19 +337,16 @@
"project": "projects/maps-ng/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/maps-ng/tsconfig.lib.json"
},
"development": {
"tsConfig": "projects/maps-ng/tsconfig.lib.json"
}
"development": {}
}
},
"test": {
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "projects/maps-ng/tsconfig.spec.json",
"browsers": ["chromium"]
"browsers": ["chromium"],
"coverageExclude": ["**/index.ts", "**/*.module.ts", "**/*.d.ts", "public-api.ts"],
"coverageReporters": ["cobertura", "html", "text"]
}
},
"lint": {
Expand Down Expand Up @@ -393,7 +391,9 @@
"options": {
"tsConfig": "projects/dashboards-ng/tsconfig.spec.json",
"buildTarget": "dashboards-ng:test-target",
"browsers": ["chromium"]
"browsers": ["chromium"],
"coverageExclude": ["**/*.module.ts", "public-api.ts", "test-main.ts"],
"coverageReporters": ["cobertura", "html", "text"]
}
},
"lint": {
Expand Down
78 changes: 0 additions & 78 deletions karma.shared.cjs

This file was deleted.

Loading
Loading