scaffold the antares-python project with dev tools #1
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: Antares Python CI | |
| on: | |
| push: | |
| paths: | |
| - 'antares-python/**' | |
| pull_request: | |
| paths: | |
| - 'antares-python/**' | |
| jobs: | |
| test: | |
| name: Run Tests, Lint, Type-check | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: antares-python | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| run: | | |
| curl -Ls https://astral.sh/uv/install.sh | bash | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Create and activate venv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -U uv | |
| - name: Install dependencies | |
| run: | | |
| uv pip install -r requirements.txt || true | |
| uv pip install -e . | |
| uv pip install pytest mypy ruff | |
| - name: Run linters | |
| run: ruff check . | |
| - name: Run formatters | |
| run: ruff format --check . | |
| - name: Run mypy | |
| run: mypy src/ | |
| - name: Run tests with coverage | |
| run: pytest --cov=src --cov-report=term-missing --cov-fail-under=80 | |