Fix CI workflow linting step
Some checks failed
CI / test (push) Failing after 7s

This commit is contained in:
2026-02-01 21:01:00 +00:00
parent 28cf9c2d7d
commit c4ccfccb61

View File

@@ -2,35 +2,37 @@ name: CI
on: on:
push: push:
branches: [main] branches: [main, master]
pull_request: pull_request:
branches: [main] branches: [main, master]
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -e . pytest pytest-cov pip install -e ".[dev]"
- name: Run tests
run: pytest tests/ -v --tb=short || exit 1
lint: - name: Run tests
runs-on: ubuntu-latest run: |
steps: python -m pytest tests/ -v --tb=short
- uses: actions/checkout@v4 EXIT_CODE=$?
- name: Set up Python if [ $EXIT_CODE -ne 0 ]; then
uses: actions/setup-python@v5 echo "Tests failed with exit code $EXIT_CODE"
with: exit $EXIT_CODE
python-version: '3.11' fi
- name: Install ruff
run: pip install ruff - name: Run linting
- name: Run ruff run: |
run: ruff check src/confgen/ || exit 1 pip install ruff
ruff check src/confgen/ tests/