Files
krawl.es/.github/workflows/pr-checks.yml
Lorenzo Venerandi 3341b8a1b9 fixed workflow check
2026-01-23 22:03:47 +01:00

57 lines
1.2 KiB
YAML

name: PR Checks
on:
pull_request:
branches:
- main
- beta
- dev
permissions:
contents: read
pull-requests: read
jobs:
lint-and-test:
name: Lint & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install black flake8 pylint pytest
- name: Black format check
run: |
if ! black --check src/; then
echo "Run 'black src/' to format code"
black --diff src/
exit 1
fi
- name: Flake8 lint
run: flake8 src/ --max-line-length=120 --extend-ignore=E203,W503
- name: Pylint check
run: pylint src/ --fail-under=7.0 || true
- name: Run tests
run: pytest tests/ -v || true
build-docker:
name: Build Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t krawl:test .