feat:add attributes histogram etc to the live result. Add in the abil… #335
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: build | |
| on: | |
| push: | |
| pull_request: | |
| branches: main | |
| env: | |
| MPLBACKEND: agg | |
| jobs: | |
| build-with-uv: | |
| name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.12", "3.13"] | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| DEPENDENCIES: protobuf==5.26.0 | |
| LABEL: -oldest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Get the number of CPUs | |
| id: cpus | |
| run: | | |
| import os, platform | |
| num_cpus = os.cpu_count() | |
| print(f"Number of CPU: {num_cpus}") | |
| print(f"Architecture: {platform.machine()}") | |
| output_file = os.environ["GITHUB_OUTPUT"] | |
| with open(output_file, "a", encoding="utf-8") as output_stream: | |
| output_stream.write(f"count={num_cpus}\n") | |
| shell: python | |
| - name: Install dependencies and package | |
| run: | | |
| uv sync --extra tests | |
| - name: Install oldest supported versions | |
| if: contains(matrix.LABEL, 'oldest') | |
| run: | | |
| uv pip install ${{ matrix.DEPENDENCIES }} | |
| - name: Display Python, pip and package versions | |
| run: | | |
| uv run python -V | |
| uv pip list | |
| - name: Run docstring tests | |
| continue-on-error: true | |
| run: | | |
| uv run pytest --doctest-modules --doctest-continue-on-failure --ignore-glob=deapi/tests deapi | |
| - name: Run tests | |
| run: | | |
| uv run pytest --timeout=60 --cov=. --cov-report=xml | |
| - name: Generate line coverage | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| uv run coverage report --show-missing | |
| - name: Upload coverage to Codecov | |
| if: ${{ always() }} | |
| uses: codecov/codecov-action@v4 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |