Add Python 3.14 support and improve coverage #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Integration Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test-integration: | |
| name: NC ${{ matrix.nextcloud-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| nextcloud-version: ["32", "33"] | |
| services: | |
| nextcloud: | |
| image: nextcloud:${{ matrix.nextcloud-version }} | |
| env: | |
| SQLITE_DATABASE: nextcloud | |
| NEXTCLOUD_ADMIN_USER: admin | |
| NEXTCLOUD_ADMIN_PASSWORD: admin | |
| ports: | |
| - 8080:80 | |
| options: >- | |
| --health-cmd "curl -f http://localhost/status.php || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 30 | |
| --health-start-period 60s | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Wait for Nextcloud | |
| run: | | |
| for i in $(seq 1 60); do | |
| if curl -sf http://localhost:8080/status.php | python3 -c "import sys,json; sys.exit(0 if json.load(sys.stdin)['installed'] else 1)" 2>/dev/null; then | |
| echo "Nextcloud is ready" | |
| break | |
| fi | |
| echo "Waiting... ($i)" | |
| sleep 3 | |
| done | |
| - name: Configure Nextcloud for testing | |
| run: | | |
| NC_CONTAINER=${{ job.services.nextcloud.id }} | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set ratelimit_protection_enabled --value=false --type=boolean" | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set auth.bruteforce.protection.enabled --value=false --type=boolean" | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set loglevel --value=0 --type=integer" | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:install spreed" || echo "spreed already installed" | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:install admin_notifications" || echo "admin_notifications already installed" | |
| docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:list" | head -30 | |
| - name: Run integration tests | |
| env: | |
| NEXTCLOUD_URL: http://localhost:8080 | |
| NEXTCLOUD_USER: admin | |
| NEXTCLOUD_PASSWORD: admin | |
| run: pytest tests/integration/ -v -m integration --cov=nextcloud_mcp --cov-report=xml:coverage-integration.xml | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage-integration.xml | |
| flags: integration,nc${{ matrix.nextcloud-version }} | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| - name: Dump Nextcloud logs on failure | |
| if: failure() | |
| run: | | |
| docker exec ${{ job.services.nextcloud.id }} cat /var/www/html/data/nextcloud.log 2>/dev/null | tail -50 || echo "No logs found" |