final commit
Some checks failed
Test Suite / lint (push) Has been cancelled
Test Suite / test (3.10) (push) Has been cancelled
Test Suite / test (3.11) (push) Has been cancelled
Test Suite / test (3.12) (push) Has been cancelled
Test Suite / test (3.8) (push) Has been cancelled
Test Suite / test (3.9) (push) Has been cancelled
Test Suite / security (push) Has been cancelled
Test Suite / package (push) Has been cancelled

This commit is contained in:
2025-07-31 23:10:21 -04:00
parent f4c99ab5db
commit 3e2430fbe0
13 changed files with 178 additions and 244 deletions

117
.gitea/workflows/test.yml Normal file
View File

@@ -0,0 +1,117 @@
name: Test Suite
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint with flake8
run: flake8 wikijs tests --max-line-length=88 --ignore=E203,E501,W503
- name: Format check with black
run: black --check wikijs tests --line-length=88
- name: Import sort check
run: isort --check-only wikijs tests --line-length=88
- name: Type check with mypy
run: mypy wikijs
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run unit tests
run: pytest tests/ -v --cov=wikijs --cov-report=xml --cov-report=term-missing
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.11'
with:
name: coverage-report
path: |
./coverage.xml
./tests/htmlcov/
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run security scan with bandit
run: bandit -r wikijs -f json -o bandit-report.json || true
- name: Upload security report
uses: actions/upload-artifact@v4
with:
name: security-report
path: bandit-report.json
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: twine check dist/*
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: python-package
path: dist/