feat: POWER-4723 - Add support for fallback rating flag in Heimdall DLR and Circuit Rating #106
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: Python Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'python/**' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'python/**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: python | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Validate pyproject.toml structure | |
| run: poetry check | |
| - name: Regenerate poetry.lock to check sync | |
| run: poetry lock | |
| - name: Fail if poetry.lock is out of sync | |
| run: | | |
| git diff --exit-code poetry.lock || ( | |
| echo "::error file=poetry.lock::poetry.lock is not up to date with pyproject.toml. Run 'poetry lock' and commit the result." | |
| exit 1 | |
| ) | |
| - name: Install dependencies (incl. dev) | |
| run: poetry install --with dev | |
| - name: Lint code | |
| run: poetry run ruff check . | |
| - name: Check formatting | |
| run: poetry run ruff format --check . | |
| - name: Run unit tests | |
| run: poetry run pytest tests/unit -v | |
| - name: Build package | |
| run: poetry build |