Move to workflows
This commit is contained in:
51
.github/workflows/dependabot_tests.yml
vendored
Normal file
51
.github/workflows/dependabot_tests.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: Test Dependabot PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
# - master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test_dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install flake8 # Install flake8 for linting
|
||||
|
||||
- name: Lint with Flake8
|
||||
run: |
|
||||
# Stop the build if there are Python syntax errors or undefined names
|
||||
echo "Running Flake8 for critical errors (E9, F63, F7, F82)..."
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# Run Flake8 for other checks, but don't fail the build (exit-zero)
|
||||
# Report style issues, complexity, etc.
|
||||
echo "Running Flake8 for other style checks (non-blocking)..."
|
||||
flake8 . --count --exit-zero --max-complexity=12 --max-line-length=119 --statistics
|
||||
|
||||
- name: Test FastAPI app import
|
||||
run: |
|
||||
echo "Testing FastAPI application import..."
|
||||
python -c "from core.scripts.webpanel.app import app; print('FastAPI app imported successfully')"
|
||||
|
||||
- name: Test CLI basic functionality
|
||||
run: |
|
||||
echo "Testing CLI --help command..."
|
||||
python core/cli.py --help
|
||||
Reference in New Issue
Block a user