This commit is contained in:
@@ -2,16 +2,18 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
@@ -24,15 +26,7 @@ jobs:
|
|||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: python -m pytest tests/ -v --tb=short
|
||||||
python -m pytest tests/ -v --tb=short
|
|
||||||
EXIT_CODE=$?
|
|
||||||
if [ $EXIT_CODE -ne 0 ]; then
|
|
||||||
echo "Tests failed with exit code $EXIT_CODE"
|
|
||||||
exit $EXIT_CODE
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Run linting
|
- name: Run ruff linting
|
||||||
run: |
|
run: pip install ruff && ruff check src/confgen/ tests/
|
||||||
pip install ruff
|
|
||||||
ruff check src/confgen/ tests/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user