[Mod] refine dependabot config and harden workflow
This commit is contained in:
1 parent
384b2e4309
commit
25ff0b4c27
3 files changed
+64
-56
No files matched your search
@@ -1,33 +1,41 @@
|
||||
name: Python application
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [master, dev]
|
||||
pull_request:
|
||||
branches: [master, dev]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff mypy uv types-tqdm
|
||||
uv pip install ta-lib==0.6.4 --index=https://pypi.vnpy.com --system
|
||||
uv pip install -e .[alpha,dev] --system
|
||||
- name: Lint with ruff
|
||||
run: |
|
||||
# Run ruff linter based on pyproject.toml configuration
|
||||
ruff check .
|
||||
- name: Type check with mypy
|
||||
run: |
|
||||
# Run mypy type checking based on pyproject.toml configuration
|
||||
mypy vnpy
|
||||
- name: Build packages with uv
|
||||
run: |
|
||||
# Build source distribution and wheel distribution
|
||||
uv build
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
cache: pip
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff mypy uv types-tqdm
|
||||
uv pip install ta-lib==0.6.4 --index=https://pypi.vnpy.com --system
|
||||
uv pip install -e .[alpha,dev] --system
|
||||
|
||||
- name: Lint
|
||||
run: ruff check .
|
||||
|
||||
- name: Type check
|
||||
run: mypy vnpy
|
||||
|
||||
- name: Build
|
||||
run: uv build
|
||||
Reference in new issue
Block a user