mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
Python 3.10 reached end of life on 2026-10-01, and the patched releases of Pillow (13.0.0) and filelock (>=4.2.1) require Python >=3.11, so the 3.10 resolution fork kept vulnerable versions in every lockfile. - requires-python = ">=3.11,<4" in all pyproject.toml files, the cookiecutter template, and the CLI codegen project template - CI: drop the ubuntu 3.10 matrix rows, move the macOS/Windows minimum rows and the lint jobs to 3.11, drop 3.10 from the nox sessions - READMEs: state 3.11 as the minimum supported version
122 lines
3.5 KiB
YAML
Vendored
122 lines
3.5 KiB
YAML
Vendored
name: 🧪 test openbb-government-us
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [develop, main, v5]
|
|
paths:
|
|
- "openbb_platform/providers/government_us/**"
|
|
- ".github/workflows/test-unit-openbb-government-us.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: test-openbb-government-us-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build sdist + wheel
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: openbb_platform/providers/government_us
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- run: python -m pip install --upgrade pip uv
|
|
|
|
- name: Build sdist + wheel
|
|
run: uv build --no-sources
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: openbb-government-us-dist
|
|
path: openbb_platform/providers/government_us/dist/
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
|
|
lint:
|
|
name: Lint (ruff + ty)
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: openbb_platform/providers/government_us
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- run: python -m pip install --upgrade pip uv
|
|
|
|
- name: Install openbb-core (sibling) + package + dev tooling
|
|
run: |
|
|
uv pip install --system ../../core
|
|
uv pip install --system -e .
|
|
uv pip install --system --group dev
|
|
|
|
- name: ruff check
|
|
run: ruff check openbb_government_us tests integration
|
|
|
|
- name: ruff format --check
|
|
run: ruff format --check openbb_government_us tests integration
|
|
|
|
- name: ty check
|
|
run: ty check openbb_government_us
|
|
|
|
test:
|
|
name: Test (${{ matrix.os }} / Python ${{ matrix.python_version }})
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { os: ubuntu-latest, python_version: "3.11" }
|
|
- { os: ubuntu-latest, python_version: "3.12" }
|
|
- { os: ubuntu-latest, python_version: "3.13" }
|
|
- { os: ubuntu-latest, python_version: "3.14" }
|
|
- { os: macos-latest, python_version: "3.11" }
|
|
- { os: macos-latest, python_version: "3.14" }
|
|
- { os: windows-latest, python_version: "3.11" }
|
|
- { os: windows-latest, python_version: "3.14" }
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: openbb_platform/providers/government_us
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
allow-prereleases: true
|
|
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: openbb-government-us-dist
|
|
path: openbb_platform/providers/government_us/dist
|
|
|
|
- run: python -m pip install --upgrade pip uv
|
|
|
|
- name: Install openbb-core (sibling) + dev tooling + the built wheel
|
|
run: |
|
|
uv pip install --system ../../core
|
|
uv pip install --system --group dev
|
|
uv pip install --system dist/openbb_government_us-*.whl
|
|
|
|
- name: Run unit tests against the built wheel
|
|
run: |
|
|
rm -rf openbb_government_us
|
|
pytest tests --cov=openbb_government_us --cov-report=term-missing --cov-fail-under=100
|