mirror of
https://github.com/nyakang/nyaterm.git
synced 2026-11-15 00:08:07 +00:00
- Introduced `rust-toolchain.toml` to specify Rust version 1.99.1 with a minimal profile. - Added `rustfmt.toml` to enforce the 2024 edition style for Rust formatting. - Updated GitHub Actions workflows to read the Rust toolchain version dynamically and adjusted caching strategies accordingly. - Enhanced CI workflows with orchestrate jobs for better job selection and dependency management. - Implemented scheduled runs for CI workflows to ensure regular checks.
111 lines
3.2 KiB
YAML
111 lines
3.2 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 19 * * 6'
|
|
merge_group:
|
|
types: [checks_requested]
|
|
push:
|
|
branches: [main, migration/gpui]
|
|
pull_request:
|
|
branches: [main, migration/gpui]
|
|
|
|
# No paths filter, for the same reason as rust.yml: a filtered-out workflow never
|
|
# reports its gate, which blocks any pull request that requires it.
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
|
|
|
|
jobs:
|
|
orchestrate:
|
|
name: Select CI jobs
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
outputs:
|
|
run_docs: ${{ steps.select.outputs.run_docs }}
|
|
steps:
|
|
- name: Checkout tested revision and comparison history
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Test selection rules and workflow gates
|
|
run: python -m unittest scripts.tests.test_select_rust_jobs -v
|
|
|
|
- name: Select jobs for this event
|
|
id: select
|
|
run: python scripts/ci/select_rust_jobs.py
|
|
|
|
docs:
|
|
needs: [orchestrate]
|
|
if: needs.orchestrate.outputs.run_docs == 'true'
|
|
# This job name is quoted in docs-site/docs/development/setup.md and its English
|
|
# mirror. Keep the two in step if it ever changes.
|
|
name: Documentation site
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Check translation parity and authoring leftovers
|
|
run: python3 scripts/ci/check_docs_translations.py
|
|
|
|
# pnpm 11 requires Node.js >= 22.13 (it imports node:sqlite), and Node 20
|
|
# reached end of life in April 2026. pnpm is pinned exactly rather than to
|
|
# the 11 range so a future 11.x cannot raise the Node floor again without
|
|
# this file changing.
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 11.15.1
|
|
run_install: false
|
|
|
|
- name: Install documentation dependencies
|
|
run: pnpm --dir docs-site install --frozen-lockfile
|
|
|
|
- name: Build all locales
|
|
run: pnpm --dir docs-site build
|
|
|
|
gate:
|
|
name: Docs gate
|
|
runs-on: ubuntu-24.04
|
|
needs: [orchestrate, docs]
|
|
if: always()
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Summarize dependency results
|
|
env:
|
|
NEEDS_JSON: ${{ toJSON(needs) }}
|
|
run: |
|
|
{
|
|
printf '| Job | Result |\n| --- | --- |\n'
|
|
jq -r 'to_entries[] | "| \(.key) | \(.value.result) |"' <<< "$NEEDS_JSON"
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
- name: Check dependency results
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
run: exit 1
|