|
21 | 21 | vscode: ${{ steps.filter.outputs.vscode }} |
22 | 22 | lsp: ${{ steps.filter.outputs.lsp }} |
23 | 23 | ci: ${{ steps.filter.outputs.ci }} |
| 24 | + docs: ${{ steps.filter.outputs.docs }} |
24 | 25 | steps: |
25 | 26 | - uses: actions/checkout@v7 |
26 | 27 | - uses: dorny/paths-filter@v4 |
|
46 | 47 | - '.github/**' |
47 | 48 | - 'Makefile' |
48 | 49 | - '.pre-commit-config.yaml' |
| 50 | + docs: |
| 51 | + - 'docs/**' |
| 52 | + - 'mkdocs.yml' |
| 53 | + - '.readthedocs.yaml' |
49 | 54 |
|
50 | 55 | doc-tests: |
51 | 56 | needs: changes |
|
73 | 78 | source .venv/bin/activate |
74 | 79 | make doc-test |
75 | 80 |
|
| 81 | + docs-build: |
| 82 | + needs: changes |
| 83 | + if: |
| 84 | + needs.changes.outputs.docs == 'true' || needs.changes.outputs.ci == |
| 85 | + 'true' || github.ref == 'refs/heads/main' |
| 86 | + runs-on: ubuntu-latest |
| 87 | + env: |
| 88 | + UV: '1' |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v7 |
| 91 | + - name: Set up Python |
| 92 | + # Match the Python version Read the Docs builds with (.readthedocs.yaml) |
| 93 | + uses: actions/setup-python@v7 |
| 94 | + with: |
| 95 | + python-version: '3.10' |
| 96 | + - name: Install uv |
| 97 | + uses: astral-sh/setup-uv@v7 |
| 98 | + - name: Install dependencies |
| 99 | + run: | |
| 100 | + uv venv .venv |
| 101 | + source .venv/bin/activate |
| 102 | + make install-doc |
| 103 | + - name: Build docs |
| 104 | + run: | |
| 105 | + source .venv/bin/activate |
| 106 | + mkdocs build --strict |
| 107 | +
|
76 | 108 | style-and-cicd-tests: |
77 | 109 | needs: changes |
78 | 110 | if: |
@@ -403,9 +435,43 @@ jobs: |
403 | 435 | ./.github/scripts/manage-test-db.sh "${{ matrix.engine }}" |
404 | 436 | "$TEST_DB_NAME" up |
405 | 437 | - name: Run tests |
| 438 | + env: |
| 439 | + # Temporary BigQuery diagnostics: since 2026-10-31 the BigQuery runner either shuts |
| 440 | + # down or stops responding mid-pytest, and its log is never uploaded. Keep the |
| 441 | + # evidence in files, stop pytest before the job limit so the runner can recover, |
| 442 | + # and upload the files in the steps below. Remove once fixed. |
| 443 | + PYTHONUNBUFFERED: ${{ matrix.engine == 'bigquery' && '1' || '' }} |
| 444 | + PYTEST_ADDOPTS: ${{ matrix.engine == 'bigquery' && '-v' || '' }} |
406 | 445 | run: | |
407 | 446 | source .venv/bin/activate |
408 | | - make ${{ matrix.engine }}-test |
| 447 | + if [ "${{ matrix.engine }}" != "bigquery" ]; then |
| 448 | + make ${{ matrix.engine }}-test |
| 449 | + exit |
| 450 | + fi |
| 451 | + mkdir -p test-results |
| 452 | + ( |
| 453 | + while true; do |
| 454 | + echo "[resources $(date -u +%T)] $(free -m | awk '/Mem:/{print "mem_used="$3"MB mem_avail="$7"MB"}') $(free -m | awk '/Swap:/{print "swap_used="$3"MB"}') $(df -h / | awk 'NR==2{print "disk_used="$5}')" |
| 455 | + ps -eo rss=,args= --sort=-rss | head -4 | awk '{rss=$1; $1=""; printf " rss=%dMB %.120s\n", rss/1024, $0}' |
| 456 | + sleep 5 |
| 457 | + done |
| 458 | + ) >> test-results/bigquery-resources.log 2>&1 & |
| 459 | + trap "kill $! 2>/dev/null || true" EXIT |
| 460 | + make engine-bigquery-install |
| 461 | + uv pip install -e ".[bigframes]" |
| 462 | + # Same commands as the Makefile's bigquery-test target, under a timeout so |
| 463 | + # pytest itself (not just make) is stopped before the 25 minute job limit. |
| 464 | + set -o pipefail |
| 465 | + timeout --kill-after=60s 18m pytest -n auto -m "bigquery" --reruns 3 \ |
| 466 | + --junitxml=test-results/junit-bigquery.xml 2>&1 | tee test-results/bigquery-pytest.log |
| 467 | + - name: Collect BigQuery diagnostics |
| 468 | + if: ${{ always() && matrix.engine == 'bigquery' }} |
| 469 | + run: | |
| 470 | + mkdir -p test-results |
| 471 | + sudo dmesg -T | grep -iE 'out of memory|oom|killed process' > test-results/bigquery-dmesg.log || true |
| 472 | + echo "== kernel OOM messages"; cat test-results/bigquery-dmesg.log |
| 473 | + echo "== last resource samples"; tail -n 60 test-results/bigquery-resources.log || true |
| 474 | + echo "== last pytest output"; tail -n 60 test-results/bigquery-pytest.log || true |
409 | 475 | - name: Tear down test database |
410 | 476 | if: always() |
411 | 477 | run: |
@@ -470,13 +536,26 @@ jobs: |
470 | 536 | - name: Install code-server |
471 | 537 | # Pinned so that a code-server release cannot change the editor UI the |
472 | 538 | # tests drive without the change showing up here first. |
473 | | - run: curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.137.0 |
| 539 | + # The installer curls the .deb once. A reset (curl exit 56) fails the |
| 540 | + # job. A repeat resumes the partial file the installer leaves behind. |
| 541 | + run: | |
| 542 | + set -euo pipefail |
| 543 | + for attempt in 1 2 3 4 5; do |
| 544 | + if curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.137.0; then |
| 545 | + exit 0 |
| 546 | + fi |
| 547 | + echo "code-server install failed (attempt ${attempt}); retrying" |
| 548 | + sleep $((attempt * 5)) |
| 549 | + done |
| 550 | + echo "code-server install failed after 5 attempts" |
| 551 | + exit 1 |
474 | 552 | - name: Install Playwright browsers |
475 | 553 | working-directory: ./vscode/extension |
476 | 554 | run: pnpm exec playwright install |
477 | 555 | - name: Run e2e tests |
478 | 556 | working-directory: ./vscode/extension |
479 | | - timeout-minutes: 30 |
| 557 | + # CI runs one worker. That needs a longer cap than the old 30 minutes. |
| 558 | + timeout-minutes: 60 |
480 | 559 | run: | |
481 | 560 | source ../../.venv/bin/activate |
482 | 561 | pnpm run test:e2e |
|
0 commit comments