mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-05 00:52:53 +08:00
更新 GitHub Actions 工作流
This commit is contained in:
15
.github/workflows/pylint.yml
vendored
15
.github/workflows/pylint.yml
vendored
@@ -24,12 +24,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.12'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Cache pip dependencies
|
- name: Cache pip dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements.in') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements.in') }}
|
||||||
@@ -38,13 +39,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
pip install pylint
|
pip install pylint
|
||||||
# 安装项目依赖
|
# 安装项目依赖
|
||||||
if [ -f requirements.txt ]; then
|
if [ -f requirements.txt ]; then
|
||||||
|
echo "📦 安装 requirements.txt 中的依赖..."
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
elif [ -f requirements.in ]; then
|
elif [ -f requirements.in ]; then
|
||||||
|
echo "📦 安装 requirements.in 中的依赖..."
|
||||||
pip install -r requirements.in
|
pip install -r requirements.in
|
||||||
|
else
|
||||||
|
echo "⚠️ 未找到依赖文件,仅安装 pylint"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Verify pylint config
|
- name: Verify pylint config
|
||||||
@@ -83,7 +88,7 @@ jobs:
|
|||||||
pylint app/ --score=yes --reports=no | tail -2 || true
|
pylint app/ --score=yes --reports=no | tail -2 || true
|
||||||
|
|
||||||
- name: Upload pylint report
|
- name: Upload pylint report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: pylint-report
|
name: pylint-report
|
||||||
|
|||||||
Reference in New Issue
Block a user