File: coverage.yml

package info (click to toggle)
lazy-loader 0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: python: 296; sh: 9; makefile: 7
file content (39 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download
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
name: coverage

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  report:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10"]
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install packages
        run: |
          python -m pip install --upgrade pip wheel setuptools
          python -m pip install ".[test]"
          python -m pip install --upgrade numpy
          python -m pip uninstall --yes scipy
          pip list

      - name: Measure test coverage
        run: |
          python -m pytest --cov=lazy_loader --durations=10
          # Tests fail if using `--doctest-modules`. I.e.,
          # python -m pytest --cov=lazy_loader --doctest-modules --durations=20

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}