chore(actions): bump actions/setup-python from 5 to 6 #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pytest | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Lint with flake8 | |
| run: | | |
| # Check if src directory exists | |
| if [ -d "src" ]; then | |
| flake8 src/ | |
| else | |
| echo "src/ directory not found, skipping linting for src/" | |
| fi | |
| # Check if tests directory exists | |
| if [ -d "tests" ]; then | |
| flake8 tests/ | |
| else | |
| echo "tests/ directory not found, skipping linting for tests/" | |
| fi | |
| - name: Test with pytest | |
| run: | | |
| if [ -d "tests" ] && [ -n "$(find tests -name '*.py' -print -quit)" ]; then | |
| pytest --maxfail=1 --disable-warnings -q | |
| else | |
| echo "No tests found, skipping test execution" | |
| fi |