name: 🧪 test openbb-charting on: pull_request: branches: [develop, main, v5] paths: - "openbb_platform/obbject_extensions/charting/**" - ".github/workflows/test-unit-openbb-charting.yml" workflow_dispatch: permissions: contents: read concurrency: # Cancel in-flight matrix runs when a new commit lands on the same PR. group: test-openbb-charting-${{ 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/obbject_extensions/charting 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@v5 with: name: openbb-charting-dist path: openbb_platform/obbject_extensions/charting/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/obbject_extensions/charting steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.11" - run: python -m pip install --upgrade pip uv - uses: actions/download-artifact@v5 with: name: openbb-charting-dist path: openbb_platform/obbject_extensions/charting/dist - name: Install dependencies then openbb-charting wheel run: | uv pip install --system ../../core uv pip install --system --group dev uv pip install --system dist/openbb_charting-*.whl - name: ruff check run: ruff check openbb_charting tests - name: ruff format --check run: ruff format --check openbb_charting tests - name: ty check run: ty check openbb_charting test: name: Test (${{ matrix.os }} / Python ${{ matrix.python_version }}) needs: build strategy: fail-fast: false matrix: include: - { os: ubuntu-latest, python_version: "3.10" } - { 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.10" } - { os: macos-latest, python_version: "3.14" } - { os: windows-latest, python_version: "3.10" } - { os: windows-latest, python_version: "3.14" } runs-on: ${{ matrix.os }} defaults: run: shell: bash working-directory: openbb_platform/obbject_extensions/charting steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python_version }} allow-prereleases: true - uses: actions/download-artifact@v5 with: name: openbb-charting-dist path: openbb_platform/obbject_extensions/charting/dist - run: python -m pip install --upgrade pip uv - name: Install dependencies then openbb-charting wheel run: | uv pip install --system ../../core uv pip install --system --group dev uv pip install --system dist/openbb_charting-*.whl - name: Test the installed wheel run: | rm -rf openbb_charting pytest tests --cov=openbb_charting --cov-report=term-missing --cov-fail-under=100