Files
noteflow/.gitea/workflows/quality.yml
Travis Vasceannie 301482c410
Some checks failed
CI / test-python (push) Successful in 8m41s
CI / test-typescript (push) Failing after 6m2s
CI / test-rust (push) Failing after 4m28s
Refactor: Improve CI workflow robustness and test environment variable management, and enable parallel quality test execution.
2026-01-26 02:04:38 +00:00

139 lines
3.3 KiB
YAML

name: Quality
on:
pull_request:
branches: [main, master, develop]
env:
PYTHON_VERSION: "3.12"
NODE_VERSION: "22"
RUST_TOOLCHAIN: "stable"
jobs:
quality-python:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore uv cache
uses: actions/cache@v4
timeout-minutes: 2
continue-on-error: true
with:
path: ~/.cache/uv
key: ${{ runner.os }}-py${{ env.PYTHON_VERSION }}-uv-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
${{ runner.os }}-py${{ env.PYTHON_VERSION }}-uv-
- name: Install dependencies
run: |
python -m pip install --upgrade uv
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[dev,all]"
- name: Create hygiene directory
run: mkdir -p .hygeine
- name: Run Basedpyright type checking
run: |
source .venv/bin/activate
basedpyright
- name: Run Ruff linting
run: |
source .venv/bin/activate
ruff check .
- name: Run Python quality tests
run: |
source .venv/bin/activate
pytest tests/quality/ -n auto -q
quality-typescript:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Create hygiene directory
run: mkdir -p ../.hygeine
- name: Run TypeScript type checking
run: npm run type-check
- name: Run Biome linting
run: npx biome lint . --reporter=github
- name: Check Biome formatting
run: npm run format:check
- name: Run TypeScript quality tests
run: npm run test:quality
quality-rust:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: client/src-tauri
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Tauri)
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libasound2-dev
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- name: Cache Cargo
uses: actions/cache@v4
timeout-minutes: 2
continue-on-error: true
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
client/src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('client/src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Check formatting
run: cargo fmt --check
- name: Run Clippy
run: cargo clippy -- -D warnings