Release v2.2.0 - Major improvements and modernization #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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Set up Python | |
| run: uv python install 3.10 | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Run ruff format check | |
| run: uv run ruff format --check src tests | |
| - name: Run ruff linter | |
| run: uv run ruff check src tests | |
| - name: Run mypy | |
| run: uv run mypy src/ | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Run tests with coverage | |
| env: | |
| ALPACA_API_KEY: ${{ secrets.ALPACA_API_KEY }} | |
| ALPACA_SECRET_KEY: ${{ secrets.ALPACA_SECRET_KEY }} | |
| run: | | |
| uv run pytest --cov=py_alpaca_api --cov-report=xml --cov-report=term-missing tests | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true |