5e76ddc60d
Remove URL rewriting logic from MCP server that was converting
public URLs to internal Docker URLs. This was a workaround for
Nextcloud's overwritehost setting forcing URLs to localhost:8080.
Changes:
- Remove OIDC endpoint rewriting in app.py (setup_oauth_config)
- Remove OIDC_JWKS_URI override support (no longer needed)
- Remove URL rewriting in browser_oauth_routes.py
- Remove URL rewriting in token_broker.py
- Update Helm chart values and README
- Add hybrid auth setup unit tests
- Update Astrolabe admin UI for Vue 3
The proper fix is in the previous commit which removes the
overwritehost setting from Nextcloud, allowing it to respect
the Host header from incoming requests.
107 lines
3.2 KiB
YAML
107 lines
3.2 KiB
YAML
name: Docker Compose Action
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
linting:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
|
|
- name: Check format
|
|
run: |
|
|
uv run --frozen ruff format --diff
|
|
- name: Linting
|
|
run: |
|
|
uv run --frozen ruff check
|
|
- name: Linting
|
|
run: |
|
|
uv run --frozen ty check -- nextcloud_mcp_server
|
|
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
submodules: 'true'
|
|
|
|
|
|
###### Required to build OIDC App ######
|
|
|
|
- name: Set up php 8.4
|
|
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
|
|
with:
|
|
php-version: 8.4
|
|
coverage: none
|
|
|
|
- name: Install OIDC app composer dependencies
|
|
run: |
|
|
cd third_party/oidc
|
|
composer install --no-dev
|
|
|
|
###### Required to build OIDC App ######
|
|
|
|
|
|
###### Required to build Astrolabe App ######
|
|
|
|
- name: Set up Node.js for Astrolabe
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Build Astrolabe app
|
|
run: |
|
|
cd third_party/astrolabe
|
|
composer install --no-dev --optimize-autoloader
|
|
npm ci
|
|
npm run build
|
|
|
|
###### Required to build Astrolabe App ######
|
|
|
|
|
|
- name: Run docker compose
|
|
uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
|
|
with:
|
|
compose-file: "./docker-compose.yml"
|
|
#compose-flags: "--profile qdrant"
|
|
up-flags: "--build"
|
|
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
|
|
|
|
- name: Install Playwright dependencies
|
|
run: |
|
|
uv run playwright install chromium --with-deps
|
|
|
|
- name: Wait for service to be ready
|
|
run: |
|
|
echo "Waiting for service at http://localhost:8080/ocs/v2.php/apps/serverinfo/api/v1/info to return 401..."
|
|
max_attempts=60
|
|
attempt=0
|
|
until curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080/ocs/v2.php/apps/serverinfo/api/v1/info | grep -q "401"; do
|
|
attempt=$((attempt + 1))
|
|
if [ $attempt -ge $max_attempts ]; then
|
|
echo "Service did not become ready in time."
|
|
exit 1
|
|
fi
|
|
echo "Attempt $attempt/$max_attempts: Service not ready, sleeping for 5 seconds..."
|
|
sleep 5
|
|
done
|
|
echo "Service is ready (returned 401)."
|
|
|
|
# Add subsequent steps here, e.g., running tests
|
|
- name: Run tests
|
|
env:
|
|
NEXTCLOUD_HOST: "http://localhost:8080"
|
|
NEXTCLOUD_USERNAME: "admin"
|
|
NEXTCLOUD_PASSWORD: "admin"
|
|
run: |
|
|
# NOTE: Temporarily run all tests until merged
|
|
uv run pytest -v --log-cli-level=WARN #-m unit -m smoke
|