ci: 提前启用 GitHub Actions Node24 runtime #71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| markdownlint: | |
| name: Markdown Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Lint Markdown files | |
| uses: DavidAnson/markdownlint-cli2-action@v17 | |
| with: | |
| globs: | | |
| **/*.md | |
| !node_modules | |
| !.git | |
| !dist | |
| !build | |
| !out | |
| !.next | |
| py-compile: | |
| name: Python Compile Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Compile Python sources | |
| shell: bash | |
| run: | | |
| mapfile -t py_files < <(git ls-files '*.py') | |
| if [ "${#py_files[@]}" -eq 0 ]; then | |
| echo "No Python files to compile." | |
| exit 0 | |
| fi | |
| python -m py_compile "${py_files[@]}" | |
| demo-site: | |
| name: Demo Site Check | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: demo-site | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: demo-site/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build |