mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-10-24 03:26:11 -05:00
Compare commits
7 Commits
567393921b
...
f71fe9356f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f71fe9356f | ||
|
|
70d88d4b9c | ||
|
|
0b2294133d | ||
|
|
c0af82a6c3 | ||
|
|
30455d16bf | ||
|
|
52bf66781e | ||
|
|
e042f77658 |
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@@ -374,9 +374,32 @@ jobs:
|
|||||||
# Merge frontend coverage from all shards
|
# Merge frontend coverage from all shards
|
||||||
- name: Merge frontend coverage
|
- name: Merge frontend coverage
|
||||||
run: |
|
run: |
|
||||||
|
# Find all coverage-final.json files from the shards, exit with error if none found
|
||||||
|
shopt -s nullglob
|
||||||
|
files=(coverage/frontend-coverage-*/coverage/coverage-final.json)
|
||||||
|
if [ ${#files[@]} -eq 0 ]; then
|
||||||
|
echo "No frontend coverage JSON found under coverage/" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Create .nyc_output directory and copy each shard's coverage JSON into it with a unique name
|
||||||
mkdir -p .nyc_output
|
mkdir -p .nyc_output
|
||||||
npx nyc merge coverage .nyc_output/out.json
|
for coverage_json in "${files[@]}"; do
|
||||||
|
shard=$(basename "$(dirname "$(dirname "$coverage_json")")")
|
||||||
|
cp "$coverage_json" ".nyc_output/${shard}.json"
|
||||||
|
done
|
||||||
|
npx nyc merge .nyc_output .nyc_output/out.json
|
||||||
npx nyc report --reporter=lcovonly --report-dir coverage
|
npx nyc report --reporter=lcovonly --report-dir coverage
|
||||||
|
- name: Upload coverage artifacts
|
||||||
|
uses: actions/upload-artifact@v4.6.2
|
||||||
|
with:
|
||||||
|
name: merged-coverage
|
||||||
|
path: |
|
||||||
|
merged-backend-coverage.xml
|
||||||
|
.nyc_output/*
|
||||||
|
coverage/lcov.info
|
||||||
|
retention-days: 7
|
||||||
|
if-no-files-found: error
|
||||||
|
include-hidden-files: true
|
||||||
- name: SonarQube Analysis
|
- name: SonarQube Analysis
|
||||||
uses: SonarSource/sonarqube-scan-action@v5
|
uses: SonarSource/sonarqube-scan-action@v5
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ PAPERLESS_DISABLE_DBHANDLER = "true"
|
|||||||
PAPERLESS_CACHE_BACKEND = "django.core.cache.backends.locmem.LocMemCache"
|
PAPERLESS_CACHE_BACKEND = "django.core.cache.backends.locmem.LocMemCache"
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
|
relative_files = true
|
||||||
source = [
|
source = [
|
||||||
"src/",
|
"src/",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ sonar.projectName=Paperless-ngx
|
|||||||
sonar.projectVersion=1.0
|
sonar.projectVersion=1.0
|
||||||
|
|
||||||
# Source and test directories
|
# Source and test directories
|
||||||
sonar.sources=src/,src-ui/src/
|
sonar.sources=src/,src-ui/
|
||||||
sonar.tests=src/,src-ui/src/
|
|
||||||
sonar.test.inclusions=**/test_*.py,**/tests.py,**/*.spec.ts,**/*.test.ts
|
sonar.test.inclusions=**/test_*.py,**/tests.py,**/*.spec.ts,**/*.test.ts
|
||||||
|
|
||||||
# Language specific settings
|
# Language specific settings
|
||||||
|
|||||||
Reference in New Issue
Block a user