25576b0be6
Checks (magui2.0) / python-lint (push) Failing after 1s
Checks (magui2.0) / python-test (push) Failing after 0s
Checks (magui2.0) / frontend-lint (push) Failing after 0s
CodeQL Advanced / Analyze (actions) (push) Failing after 1s
Checks (magui2.0) / python-format (push) Failing after 1s
CodeQL Advanced / Analyze (python) (push) Failing after 0s
Checks (magui2.0) / python-pyright (push) Failing after 1s
Checks (magui2.0) / frontend-format (push) Failing after 1s
Checks (magui2.0) / frontend-typecheck (push) Failing after 0s
Checks (magui2.0) / frontend-test (push) Failing after 2s
CodeQL Advanced / Analyze (javascript-typescript) (push) Failing after 1s
196 lines
5.3 KiB
YAML
196 lines
5.3 KiB
YAML
name: Checks (magui2.0)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
schedule:
|
|
- cron: "0 3 * * 1" # Every Monday at 03:00 UTC
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# Python checks
|
|
python-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
version: "0.7.11"
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- run: uv sync --all-extras
|
|
working-directory: .
|
|
- name: Run format check
|
|
run: |
|
|
source .venv/bin/activate
|
|
poe fmt --check
|
|
|
|
python-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
version: "0.7.11"
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- run: uv sync --all-extras
|
|
working-directory: .
|
|
- name: Run lint
|
|
run: |
|
|
source .venv/bin/activate
|
|
poe lint
|
|
|
|
python-pyright:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
version: "0.7.11"
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- run: uv sync --all-extras
|
|
working-directory: .
|
|
- name: Run pyright
|
|
run: |
|
|
source .venv/bin/activate
|
|
poe pyright
|
|
|
|
python-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
version: "0.7.11"
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: ".python-version"
|
|
- run: uv sync --all-extras
|
|
working-directory: .
|
|
- name: Get Playwright version
|
|
id: playwright-version
|
|
run: |
|
|
source .venv/bin/activate
|
|
echo "version=$(playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT"
|
|
- name: Cache Playwright browsers
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: playwright-${{ steps.playwright-version.outputs.version }}
|
|
- name: Install Playwright browsers
|
|
run: |
|
|
source .venv/bin/activate
|
|
playwright install --with-deps
|
|
- name: Run tests
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest tests --cov=src --cov-report=xml --cov-report=term-missing
|
|
- name: Upload coverage artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: coverage-magentic-ui
|
|
path: coverage.xml
|
|
|
|
# Frontend checks
|
|
frontend-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: npm install -g pnpm@10.24.0
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: frontend
|
|
- name: Format check
|
|
run: pnpm run format:check
|
|
working-directory: frontend
|
|
|
|
frontend-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: npm install -g pnpm@10.24.0
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: frontend
|
|
- name: Lint
|
|
run: pnpm run lint
|
|
working-directory: frontend
|
|
|
|
frontend-typecheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: npm install -g pnpm@10.24.0
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: frontend
|
|
- name: Type check
|
|
run: pnpm run type-check
|
|
working-directory: frontend
|
|
|
|
frontend-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: npm install -g pnpm@10.24.0
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: frontend
|
|
- name: Test
|
|
run: pnpm run test:run
|
|
working-directory: frontend
|
|
# Turn on this step after open source.
|
|
# codecov:
|
|
# runs-on: ubuntu-latest
|
|
# needs: [python-test]
|
|
# steps:
|
|
# - uses: actions/checkout@v7
|
|
# - uses: actions/download-artifact@v4
|
|
# with:
|
|
# name: coverage-magentic-ui
|
|
# path: ./
|
|
# - uses: codecov/codecov-action@v5
|
|
# with:
|
|
# files: coverage.xml
|
|
# flags: unittests
|
|
# name: codecov-umbrella
|
|
# fail_ci_if_error: true
|
|
# token: ${{ secrets.CODECOV_TOKEN }}
|