mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-16 21:55:37 -05:00
Compare commits
7 Commits
dependabot
...
chore/sona
Author | SHA1 | Date | |
---|---|---|---|
![]() |
567393921b | ||
![]() |
158f8f6656 | ||
![]() |
372f0bd893 | ||
![]() |
dd563a8259 | ||
![]() |
f6a1d0c3b1 | ||
![]() |
bb3c513b6a | ||
![]() |
d8b1bde1c3 |
68
.github/workflows/ci.yml
vendored
68
.github/workflows/ci.yml
vendored
@@ -151,6 +151,18 @@ jobs:
|
|||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: backend-python-${{ matrix.python-version }}
|
flags: backend-python-${{ matrix.python-version }}
|
||||||
files: coverage.xml
|
files: coverage.xml
|
||||||
|
- name: Upload coverage artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: backend-coverage-${{ matrix.python-version }}
|
||||||
|
path: |
|
||||||
|
.coverage
|
||||||
|
coverage.xml
|
||||||
|
junit.xml
|
||||||
|
retention-days: 1
|
||||||
|
include-hidden-files: true
|
||||||
|
if-no-files-found: error
|
||||||
- name: Stop containers
|
- name: Stop containers
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
@@ -233,6 +245,17 @@ jobs:
|
|||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: frontend-node-${{ matrix.node-version }}
|
flags: frontend-node-${{ matrix.node-version }}
|
||||||
directory: src-ui/coverage/
|
directory: src-ui/coverage/
|
||||||
|
- name: Upload coverage artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: frontend-coverage-${{ matrix.shard-index }}
|
||||||
|
path: |
|
||||||
|
src-ui/coverage/lcov.info
|
||||||
|
src-ui/coverage/coverage-final.json
|
||||||
|
src-ui/junit.xml
|
||||||
|
retention-days: 1
|
||||||
|
if-no-files-found: error
|
||||||
tests-frontend-e2e:
|
tests-frontend-e2e:
|
||||||
name: "Frontend E2E Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"
|
name: "Frontend E2E Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -313,6 +336,51 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
run: cd src-ui && pnpm run build --configuration=production
|
run: cd src-ui && pnpm run build --configuration=production
|
||||||
|
sonarqube-analysis:
|
||||||
|
name: "SonarQube Analysis"
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs:
|
||||||
|
- tests-backend
|
||||||
|
- tests-frontend
|
||||||
|
if: github.repository_owner == 'paperless-ngx'
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Download all backend coverage
|
||||||
|
uses: actions/download-artifact@v5.0.0
|
||||||
|
with:
|
||||||
|
pattern: backend-coverage-*
|
||||||
|
path: ./coverage/
|
||||||
|
- name: Download all frontend coverage
|
||||||
|
uses: actions/download-artifact@v5.0.0
|
||||||
|
with:
|
||||||
|
pattern: frontend-coverage-*
|
||||||
|
path: ./coverage/
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
|
||||||
|
- name: Install coverage tools
|
||||||
|
run: |
|
||||||
|
pip install coverage
|
||||||
|
npm install -g nyc
|
||||||
|
# Merge backend coverage from all Python versions
|
||||||
|
- name: Merge backend coverage
|
||||||
|
run: |
|
||||||
|
coverage combine coverage/backend-coverage-*/.coverage
|
||||||
|
coverage xml -o merged-backend-coverage.xml
|
||||||
|
# Merge frontend coverage from all shards
|
||||||
|
- name: Merge frontend coverage
|
||||||
|
run: |
|
||||||
|
mkdir -p .nyc_output
|
||||||
|
npx nyc merge coverage .nyc_output/out.json
|
||||||
|
npx nyc report --reporter=lcovonly --report-dir coverage
|
||||||
|
- name: SonarQube Analysis
|
||||||
|
uses: SonarSource/sonarqube-scan-action@v5
|
||||||
|
env:
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
build-docker-image:
|
build-docker-image:
|
||||||
name: Build Docker image for ${{ github.ref_name }}
|
name: Build Docker image for ${{ github.ref_name }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
25
sonar-project.properties
Normal file
25
sonar-project.properties
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
sonar.projectKey=paperless-ngx_paperless-ngx
|
||||||
|
sonar.organization=paperless-ngx
|
||||||
|
sonar.projectName=Paperless-ngx
|
||||||
|
sonar.projectVersion=1.0
|
||||||
|
|
||||||
|
# Source and test directories
|
||||||
|
sonar.sources=src/,src-ui/src/
|
||||||
|
sonar.tests=src/,src-ui/src/
|
||||||
|
sonar.test.inclusions=**/test_*.py,**/tests.py,**/*.spec.ts,**/*.test.ts
|
||||||
|
|
||||||
|
# Language specific settings
|
||||||
|
sonar.python.version=3.10,3.11,3.12,3.13
|
||||||
|
|
||||||
|
# Coverage reports
|
||||||
|
sonar.python.coverage.reportPaths=merged-backend-coverage.xml
|
||||||
|
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||||
|
|
||||||
|
# Test execution reports
|
||||||
|
sonar.junit.reportPaths=**/junit.xml,**/test-results.xml
|
||||||
|
|
||||||
|
# Encoding
|
||||||
|
sonar.sourceEncoding=UTF-8
|
||||||
|
|
||||||
|
# Exclusions
|
||||||
|
sonar.exclusions=**/migrations/**,**/node_modules/**,**/static/**,**/venv/**,**/.venv/**,**/dist/**
|
6
uv.lock
generated
6
uv.lock
generated
@@ -782,15 +782,15 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "django-guardian"
|
name = "django-guardian"
|
||||||
version = "3.1.3"
|
version = "3.1.2"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "django", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
|
{ name = "django", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
|
||||||
{ name = "typing-extensions", marker = "(python_full_version < '3.13' and sys_platform == 'darwin') or (python_full_version < '3.13' and sys_platform == 'linux')" },
|
{ name = "typing-extensions", marker = "(python_full_version < '3.13' and sys_platform == 'darwin') or (python_full_version < '3.13' and sys_platform == 'linux')" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/81/d3/436a44c7688fce1a978224c349ba66c95bf9103d548596b7a2694fd58c03/django_guardian-3.1.3.tar.gz", hash = "sha256:12b5e66c18c97088b0adfa033ab14be68c321c170fd3ec438898271f00a71699", size = 93571, upload-time = "2025-09-10T08:36:23.928Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/28/ac/5a8f7301c0181ee9020e020a4fa519f9851726b8fd3c1177656c1f5a1be0/django_guardian-3.1.2.tar.gz", hash = "sha256:6fc93b55e5eacd1a062a959c5578b433d999a286742aa3e7e713c71046813538", size = 93422, upload-time = "2025-09-08T15:43:51.361Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/83/fc/6fd7b8bc7c52cbbfd1714673cfd28ff0b3fae32265c52d492ec0dee22cb8/django_guardian-3.1.3-py3-none-any.whl", hash = "sha256:90e28b40eea65c326a3a961908cc300f9e1cd69b74e88d38317a9befa167b71c", size = 127687, upload-time = "2025-09-10T08:36:22.533Z" },
|
{ url = "https://files.pythonhosted.org/packages/20/50/3a4a891f809c9865d30864f59f993f9535b18e3935dfad278c9682fc537f/django_guardian-3.1.2-py3-none-any.whl", hash = "sha256:6c10f88d0b7efd171ae65d7ac487a666f41eb373c6f94d80016b1a19bdfbf212", size = 127451, upload-time = "2025-09-08T15:43:49.987Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
Reference in New Issue
Block a user