Skip to content

fix: don't resolve another author's same-id revision (ROADMAP.md #75) #404

fix: don't resolve another author's same-id revision (ROADMAP.md #75)

fix: don't resolve another author's same-id revision (ROADMAP.md #75) #404

Workflow file for this run

name: Main
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Run checks
run: make check
tests-and-type-check:
runs-on: ubuntu-latest
# A wedged runner must fail in bounded time: with every kernel start
# timing out, the session tests alone would otherwise grind for hours.
timeout-minutes: 45
name: tests-and-type-check (${{ matrix.python-version }}, shard ${{ matrix.shard }})
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
# Two runners per version: the hosted runner has 2 vCPUs, so more
# xdist workers cannot help; a second machine halves the wall time.
# Shards are balanced by .test_durations (pytest-split); refresh it
# with `pytest --store-durations` when the split drifts, then run
# `make check` (pytest-split writes the file without a final newline).
shard: [1, 2]
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
# Coverage tracing only where the report is uploaded (3.11); the other
# versions run the plain suite.
- name: Run tests
env:
# A kernel start on this runner (2 vCPUs, two xdist workers each
# spawning kernels, coverage tracing on 3.11) can take well over the
# 30 s library default. Doubling covers that; going higher only
# multiplies the wall time of a broken runner, where every start in
# the module times out in sequence. A start that needs more than
# this should fail loudly — the error explains which phase timed
# out — rather than be retried.
DOCX_EDITOR_SESSION_START_TIMEOUT: "60"
run: >-
uv run python -m pytest tests -n auto
--splits 2 --group ${{ matrix.shard }}
${{ matrix.python-version == '3.11' && '--cov --cov-config=pyproject.toml --cov-report=xml' || '' }}
- name: Check typing
if: ${{ matrix.shard == 1 }}
run: uv run ty check
# Both 3.11 shards upload; codecov merges them per commit
# (codecov.yaml: notify.after_n_builds = 2).
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11
uses: codecov/codecov-action@v4
if: ${{ matrix.python-version == '3.11' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
check-docs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Check if documentation can be built
run: uv run mkdocs build -s