Skip to content
Merged
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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main, develop]
branches: [main]
pull_request:
branches: [main, develop]
branches: [main]
workflow_dispatch:

concurrency:
Expand All @@ -21,12 +21,12 @@ jobs:
uses: actions/checkout@v7

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: "3.10"

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Run prek
uses: j178/prek-action@v3.0.0
Comment on lines +28 to +29

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep workflow actions current, use prek to instead of pre-commit in ci, it's faster than pre-commit and more efficient in disk space usage, also fully compatible with the original pre-commit configurations and hooks.

可以,我觉得没问题,兼容性上应该是没问题的


# ── Unit tests (matrix: Python 3.10 / 3.11 / 3.12) ────────────────────────
test:
Expand All @@ -41,12 +41,12 @@ jobs:
uses: actions/checkout@v7

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 20

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: '3.11'

Expand All @@ -48,13 +48,13 @@ jobs:
npm install --no-audit --no-fund --no-save @rollup/rollup-linux-x64-gnu

- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6

- name: Build VitePress site
run: npm run docs:build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: docs/.vitepress/dist

Expand All @@ -68,4 +68,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5