Abeshith's picture
Docker image Build and deploy to HF Spaces Via CI/CD Steps
f6764f3
name: CI Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install flake8 black
- name: Lint with flake8
run: |
flake8 src/ app/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src/ app/ --count --max-line-length=120 --statistics --exit-zero
- name: Check formatting with black
run: |
black --check src/ app/ --line-length=120 || true
- name: Validate requirements
run: |
pip install -r requirements.txt --dry-run