File: pythonpackage.yml

package info (click to toggle)
rich 13.9.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,284 kB
  • sloc: python: 29,157; makefile: 29
file content (53 lines) | stat: -rw-r--r-- 1,638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Test Rich module

on: [pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
        exclude:
          - { os: windows-latest, python-version: "3.13" }
    defaults:
      run:
        shell: bash
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
          allow-prereleases: true
      - name: Install and configure Poetry
        # TODO: workaround for https://github.com/snok/install-poetry/issues/94
        uses: snok/install-poetry@v1.3.4
        with:
          version: 1.3.1
          virtualenvs-in-project: true
      - name: Install dependencies
        run: poetry install
        if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
      - name: Format check with black
        run: |
          source $VENV
          make format-check
      - name: Typecheck with mypy
        run: |
          source $VENV
          make typecheck
      - name: Test with pytest (with coverage)
        run: |
          source $VENV
          pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
      - name: Upload code coverage
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          file: ./coverage.xml
          name: rich
          flags: unittests
          env_vars: OS,PYTHON