Compare commits
1
Commits
main
...
ci/gitea-smoke
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abb43cf2e4 |
@@ -0,0 +1,60 @@
|
|||||||
|
name: Gitea Test
|
||||||
|
|
||||||
|
# Gitea 侧的「精简校验」流水线。
|
||||||
|
#
|
||||||
|
# 为什么一个 `uses:` 都不用:
|
||||||
|
# 本实例的 runner 是 forgejo-runner v7.0.0,其内置 act 只支持到 node20 action;
|
||||||
|
# 而 actions/checkout@v7、astral-sh/setup-uv@v10 等已切到 node24,会在 Checkout
|
||||||
|
# 阶段直接报 "must be one of: [composite docker node12 node16 node20 go sh], got node24"
|
||||||
|
# 并让整个 job 的所有 step 变成 cancelled。所以这里用 `run:` 手写等价逻辑。
|
||||||
|
#
|
||||||
|
# 职责分工:
|
||||||
|
# - Gitea(本文件):单版本快速反馈,只跑 pytest
|
||||||
|
# - GitHub(.github/workflows/ci.yml + release.yml):完整矩阵 + 构建校验 + PyPI 发布
|
||||||
|
# (PyPI Trusted Publishing 依赖 GitHub 的 OIDC 令牌,Gitea 签不出来,无法迁移)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: pytest (Python ${{ matrix.python }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# 只跑一个版本:快速反馈,完整矩阵交给 GitHub
|
||||||
|
python: ["3.13"]
|
||||||
|
steps:
|
||||||
|
- name: Fetch source
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
|
https://api.vxquant.com/git/vxquant/pytdxdata.git .
|
||||||
|
git log -1 --oneline
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
if ! command -v uv >/dev/null 2>&1; then
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
fi
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
uv --version
|
||||||
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Sync dependencies
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
uv sync --locked
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
uv run pytest -q
|
||||||
Reference in new issue
Block a user