Fix CI/CD: Add Gitea Actions workflow and fix linting issues
This commit is contained in:
34
local-ai-commit-reviewer/.gitea/workflows/ci.yml
Normal file
34
local-ai-commit-reviewer/.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
|
||||
jobs:
|
||||
lint-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Run Ruff linting
|
||||
run: ruff check src tests
|
||||
|
||||
- name: Run MyPy type checking
|
||||
run: mypy src
|
||||
|
||||
- name: Run pytest
|
||||
run: pytest tests/ -v --tb=short
|
||||
Reference in New Issue
Block a user