diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b9d3a80..d9c3301 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -69,65 +69,10 @@ jobs: } continue-on-error: true - test: - name: Tests - runs-on: ubuntu-latest - needs: [lint] - container: - image: python:3.11-slim - - steps: - - name: Setup and checkout - run: | - apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null - git clone --depth 1 --branch "${GITHUB_REF_NAME}" \ - "https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . - - - name: Install dependencies - run: | - pip install -q -r requirements.txt - pip install -q pytest pytest-cov hypothesis - - - name: Unit tests - run: | - pytest tests/test_api.py tests/test_database.py \ - tests/test_paste_*.py tests/test_metrics.py tests/test_pki.py \ - tests/test_url_shortener.py tests/test_scheduled_cleanup.py \ - -v --tb=short - - - name: Security tests - run: | - pytest tests/test_security.py tests/test_rate_limiting.py \ - tests/test_abuse_prevention.py tests/test_pow.py \ - tests/test_cli_security.py tests/test_audit.py \ - -v --tb=short - - - name: Memory leak tests - run: pytest tests/test_memory.py -v --tb=short - - - name: Fuzz tests - run: | - pytest tests/test_fuzz.py -v --tb=short \ - --hypothesis-seed=0 \ - -x - - - name: Advanced security tests - run: | - python tests/security/cli_security_audit.py - python tests/security/dos_memory_test.py - python tests/security/race_condition_test.py - python tests/security/headers_audit.py - - - name: Coverage report - run: | - pytest tests/ --cov=app --cov-report=term-missing --cov-fail-under=70 || \ - echo "::warning::Coverage below 70%" - continue-on-error: true - build-push: name: Build & Push Image runs-on: ubuntu-latest - needs: [test] + needs: [lint] if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: