Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .github/workflows/auto-merge-to-develop.yaml

This file was deleted.

131 changes: 131 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: ci

# ============================================================================
# CANONICAL CI — IDENTICAL across every scitex ecosystem repo.
# Synced by `scitex-dev ecosystem sync-workflows`; do not edit per-repo (drift
# is reverted). Package-agnostic — the package name is derived from the
# checkout, so there is nothing to substitute here.
#
# Runner: the self-hosted Spartan CPU runner (label spartan-cpu).
# Deps: installed per run with `uv` (cached) — `.[all,dev]` so every repo's
# optional deps are present; no baked-SIF completeness to maintain.
# ============================================================================

on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
schedule:
- cron: "0 17 * * *" # nightly 17:00 UTC (~02:00 JST), off-peak
workflow_dispatch:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pytest-matrix:
# Job name is a REQUIRED status check — keep verbatim fleet-wide.
name: pytest-matrix-on-ubuntu-py${{ matrix.python-version }}
runs-on: [self-hosted, Linux, X64, spartan-cpu]
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
cache-dependency-glob: pyproject.toml
- name: Install (.[all,dev]) + pytest
run: |
set -euo pipefail
uv venv --python ${{ matrix.python-version }} .venv
uv pip install --python .venv/bin/python -e ".[all,dev]" \
|| uv pip install --python .venv/bin/python -e ".[dev]" \
|| uv pip install --python .venv/bin/python -e .
# kaleido/plotly image export needs Chrome; install best-effort (no-op for non-plotly repos)
yes | .venv/bin/plotly_get_chrome >/dev/null 2>&1 || true
PKG=$(basename "$(find src -maxdepth 1 -mindepth 1 -type d ! -name '*.egg-info' | sort | head -1)")
# .venv/bin on PATH so tests that spawn the package's console script via
# subprocess (bare name, e.g. `scitex-dev …`) resolve it — else FileNotFoundError.
export PATH="$PWD/.venv/bin:$PATH"
.venv/bin/python -m pytest tests/ --cov="src/$PKG" --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
if: always() && matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false

import-smoke:
name: import-smoke-on-ubuntu-py3-12
runs-on: [self-hosted, Linux, X64, spartan-cpu]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
cache-dependency-glob: pyproject.toml
- name: Install (no extras) + import
run: |
set -euo pipefail
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e .
PKG=$(basename "$(find src -maxdepth 1 -mindepth 1 -type d ! -name '*.egg-info' | sort | head -1)")
.venv/bin/python -c "import importlib; importlib.import_module('$PKG'); print('import OK:', '$PKG')"

audit:
name: audit
runs-on: [self-hosted, Linux, X64, spartan-cpu]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
cache-dependency-glob: pyproject.toml
- name: Install + audit the workspace
run: |
set -euo pipefail
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e ".[all,dev]" \
|| uv pip install --python .venv/bin/python -e ".[dev]" \
|| uv pip install --python .venv/bin/python -e .
uv pip install --python .venv/bin/python scitex-dev
# .venv/bin on PATH so audit-all's spawned `scitex-dev` subcommands resolve.
export PATH="$PWD/.venv/bin:$PATH"
DIST=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['name'])")
# --path . audits the CHECKOUT (PR code), not the runner's shared state.
scitex-dev ecosystem audit-all "$DIST" --path "$PWD"

docs-sphinx:
name: docs-sphinx
runs-on: [self-hosted, Linux, X64, spartan-cpu]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
cache-dependency-glob: pyproject.toml
- name: Build sphinx HTML (satisfies PS-122; RTD bundle stays fresh)
run: |
set -euo pipefail
CONF=""
for c in docs/conf.py docs/source/conf.py docs/src/conf.py; do
[ -f "$c" ] && CONF="$c" && break
done
if [ -z "$CONF" ]; then
echo "no sphinx conf.py (checked docs[/source|/src]) — skipping; PS-122 satisfied by workflow content"
exit 0
fi
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e ".[docs]" \
|| uv pip install --python .venv/bin/python -e ".[all,dev]" \
|| { uv pip install --python .venv/bin/python -e .; uv pip install --python .venv/bin/python sphinx; }
CONFDIR=$(dirname "$CONF")
# use the `sphinx-build` console script (not `python -m sphinx`) so the
# auditor's PS-122 detects this workflow runs sphinx-build.
.venv/bin/sphinx-build -b html "$CONFDIR" "$CONFDIR/_build/html"
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
path-to-signatures: "signatures/cla.json"
path-to-document: "https://github.com/ywatanabe1989/scitex-dev/blob/main/CLA.md"
branch: "cla-signatures"
allowlist: bot*,ywatanabe1989
allowlist: bot*,ywatanabe1989,LLEmacs
custom-allsigned-prcomment: |
Thank you for signing the SciTeX CLA. Your contribution can now be reviewed.
custom-notsigned-prcomment: |
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/import-smoke-on-ubuntu-py3-12.yml

This file was deleted.

83 changes: 0 additions & 83 deletions .github/workflows/newb-docs-quality-on-ubuntu-latest.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/newb.yml

This file was deleted.

Loading
Loading