Refactor python-native fixed income #4
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: | |
| pull_request: | |
| env: | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package with dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev,engine]" | |
| - name: Run test suite | |
| run: pytest -q | |
| editable-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package in editable mode | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e . | |
| - name: Smoke test editable install without engine extra | |
| run: | | |
| python tests/packaging/smoke_imports.py | |
| python tests/packaging/smoke_optional_without_engine.py | |
| quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package with dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev,engine]" | |
| - name: Verify Ruff version used by lint gates | |
| run: python -c "from importlib import metadata; version = metadata.version('ruff'); print(f'ruff={version}'); assert version.startswith('0.15.'), version" | |
| - name: Run correctness-focused Ruff gate | |
| run: ruff check src/fuggers_py tests/source_coverage.py tests/test_optional_dependencies.py tests/typing tools/run_release_ruff.py tests/packaging | |
| - name: Run release-target Ruff gate | |
| run: python tools/run_release_ruff.py | |
| - name: Run phased mypy gate | |
| run: mypy | |
| - name: Run source-only coverage gate | |
| run: python tests/source_coverage.py --pytest-args -q | |
| - name: Smoke test broader example surface | |
| env: | |
| PYTHONPATH: src | |
| run: pytest -q tests/test_examples_smoke.py | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [test, editable-smoke, quality] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build tooling | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| - name: Build sdist and wheel | |
| run: python -m build | |
| - name: Smoke test installed wheel without engine extra | |
| run: | | |
| python -m venv /tmp/fuggers-wheel-venv | |
| /tmp/fuggers-wheel-venv/bin/pip install --upgrade pip | |
| WHEEL_PATH=$(ls dist/*.whl) | |
| /tmp/fuggers-wheel-venv/bin/pip install "$WHEEL_PATH" | |
| /tmp/fuggers-wheel-venv/bin/python tests/packaging/smoke_imports.py | |
| /tmp/fuggers-wheel-venv/bin/python tests/packaging/smoke_optional_without_engine.py | |
| - name: Smoke test release wheel with engine extra | |
| run: | | |
| python -m venv /tmp/fuggers-release-venv | |
| /tmp/fuggers-release-venv/bin/pip install --upgrade pip | |
| WHEEL_PATH=$(ls dist/*.whl) | |
| /tmp/fuggers-release-venv/bin/pip install "${WHEEL_PATH}[engine]" | |
| /tmp/fuggers-release-venv/bin/python tests/packaging/smoke_imports.py | |
| /tmp/fuggers-release-venv/bin/python tests/packaging/smoke_optional_with_engine.py |