Fix failing GitHub Actions CI workflows #3
Workflow file for this run
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra dev --extra logging | |
| - name: Test imports | |
| run: | | |
| uv run python -c " | |
| import neon_tree_classification | |
| from neon_tree_classification import NeonCrownDataset | |
| from scripts.get_dataloaders import get_dataloaders | |
| print('All imports successful!') | |
| " | |
| - name: Run tests | |
| run: uv run pytest tests/ -v --tb=short | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra dev | |
| - name: Check code formatting | |
| run: uv run black --check neon_tree_classification/ examples/ scripts/ tests/ |