feat: EXAA client for Austrian day-ahead prices #25
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: latest | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root | |
| - name: Install project | |
| run: poetry install --no-interaction | |
| - name: Run ruff linting | |
| run: poetry run ruff check src tests | |
| - name: Run ruff formatting check | |
| run: poetry run ruff format --check src tests | |
| - name: Run mypy type checking | |
| run: poetry run mypy src | |
| # TODO: stability of this API this weekend is poor, so skipping for now | |
| # - name: Run example notebooks | |
| # run: make test-notebooks | |
| # env: | |
| # ENTSOE_API_KEY: ${{ secrets.ENTSOE_API_KEY }} | |
| - name: Run tests with coverage | |
| run: | | |
| poetry run pytest --cov=src/nexa_marketdata --cov-report=xml --cov-report=term | |
| env: | |
| ENTSOE_API_KEY: ${{ secrets.ENTSOE_API_KEY }} | |
| - name: Check coverage threshold | |
| run: | | |
| poetry run coverage report --fail-under=80 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |