Skip to content

fix error

fix error #7

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Check failure on line 7 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
flake8 . --max-line-length=120 --exclude=.venv,venv,env
- name: Run tests with pytest (if tests exist)
run: |
if ls | grep -qE "test_.*\.py" || find . -type f -name "test_*.py" | grep -q .; then
pip install pytest
pytest --maxfail=1 --disable-warnings -q
else
echo "No tests found. Skipping pytest."
fi
fi