4.0.0: Migrate from 3x-ui to Remnawave #325
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allow manually triggering CI on any branch from the Actions UI or via | |
| # `gh workflow run ci.yml --ref <branch>`. Useful for validating feature | |
| # branches on the fork before opening an upstream PR. | |
| workflow_dispatch: | |
| jobs: | |
| python-test: | |
| name: Python Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Install package with dev dependencies | |
| run: uv sync --extra dev | |
| - name: Run tests | |
| run: uv run pytest tests/ -v --tb=short | |
| python-lint: | |
| name: Python Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Install dev dependencies | |
| run: uv sync --extra dev | |
| - name: Ruff check | |
| run: uv run ruff check src/ tests/ | |
| - name: Ruff format check | |
| run: uv run ruff format --check src/ tests/ | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Install package with dev dependencies | |
| run: uv sync --extra dev | |
| - name: Run mypy | |
| run: uv run mypy src/meridian/ | |
| validate: | |
| name: Validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Validate templates render | |
| run: | | |
| pip install jinja2 | |
| python3 tests/render_templates.py | |
| - name: Verify VERSION file format | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '[:space:]') | |
| if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then | |
| echo "VERSION file must be semver (X.Y.Z), got: $VERSION" | |
| exit 1 | |
| fi | |
| echo "OK: VERSION=$VERSION" | |
| - name: Verify CHANGELOG has current version | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '[:space:]') | |
| if ! grep -q "## \[$VERSION\]" CHANGELOG.md; then | |
| echo "CHANGELOG.md missing entry for version $VERSION" | |
| echo "Add a '## [$VERSION]' section to CHANGELOG.md before releasing" | |
| exit 1 | |
| fi | |
| echo "OK: CHANGELOG.md has entry for $VERSION" | |
| - name: Install meridian for CLI validation | |
| run: | | |
| pip install uv | |
| uv sync --extra dev | |
| - name: Verify CLI flags are documented | |
| run: uv run python tests/validate_cli_docs.py | |
| - name: Verify _PWA_APPS matches apps.json | |
| run: uv run python tests/validate_apps_sync.py | |
| - name: Verify generated Meridian contracts are current | |
| run: uv run python scripts/export_contracts.py --check | |
| shellcheck: | |
| name: Shell | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Check script syntax | |
| run: bash -n install.sh | |
| - name: Shellcheck | |
| run: shellcheck -e SC2086,SC2029,SC2087,SC2155 -S warning install.sh | |
| system-lab: | |
| name: System Lab | |
| runs-on: ubuntu-latest | |
| needs: [python-test, python-lint] | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Generate test fixtures | |
| run: bash tests/systemlab/scripts/setup-fixtures.sh | |
| - name: Run system lab | |
| run: docker compose -f tests/systemlab/compose.yml up --build --abort-on-container-exit --exit-code-from controller | |
| - name: Dump logs on failure | |
| if: failure() | |
| run: docker compose -f tests/systemlab/compose.yml logs | |
| - name: Cleanup | |
| if: always() | |
| run: docker compose -f tests/systemlab/compose.yml down -v | |
| website: | |
| name: Website Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.33.3 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| cache-dependency-path: website/pnpm-lock.yaml | |
| - name: Build Astro site | |
| run: | | |
| cd website | |
| pnpm install --frozen-lockfile | |
| pnpm run contracts:check | |
| pnpm run build | |
| - name: Type-check Astro components | |
| run: cd website && pnpm exec astro check --minimumSeverity warning | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Validate PWA demo generation | |
| run: | | |
| uv run meridian dev preview --output website/dist/demo | |
| # Verify expected files exist | |
| test -f website/dist/demo/index.html | |
| test -f website/dist/demo/pwa/app.js | |
| test -f website/dist/demo/pwa/styles.css | |
| test -f website/dist/demo/pwa/icon.svg | |
| test -f website/dist/demo/pwa/sw.js | |
| # Verify SW is no-op (disabled for static hosting) | |
| grep -q "SW disabled" website/dist/demo/pwa/sw.js | |
| # Verify client index.html is non-empty (jinja2 rendered correctly) | |
| find website/dist/demo -mindepth 2 -name 'index.html' -size +0c | grep -q . |