Feat: values axis placement #142
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 Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_call: | |
| inputs: | |
| ref: | |
| required: true | |
| type: string | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-python-tests | |
| cancel-in-progress: true | |
| jobs: | |
| python-tests: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout streamlit-pivot-table code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| persist-credentials: false | |
| submodules: "recursive" | |
| fetch-depth: 2 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install Python test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[devel,with-streamlit]" | |
| - name: Run Python unit tests with coverage | |
| run: | | |
| python -m pytest tests/ --cov=streamlit_pivot --cov-report=term-missing --cov-report=html | |
| - name: Restore Python benchmark baseline | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: tests/perf_baseline.json | |
| key: perf-baseline-python-v2-${{ runner.os }} | |
| - name: Run Python performance harness | |
| run: python tests/perf_benchmark.py --baseline-path tests/perf_baseline.json | |
| - name: Save Python benchmark baseline | |
| if: github.ref == 'refs/heads/main' && success() | |
| run: python tests/perf_benchmark.py --update-baseline --baseline-path tests/perf_baseline.json | |
| - name: Cache Python benchmark baseline | |
| if: github.ref == 'refs/heads/main' && success() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: tests/perf_baseline.json | |
| key: perf-baseline-python-v2-${{ runner.os }} |