File: testing.yml

package info (click to toggle)
texext 0.6.7-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 760 kB
  • sloc: python: 1,946; makefile: 15
file content (57 lines) | stat: -rw-r--r-- 1,729 bytes parent folder | download | duplicates (3)
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
54
55
56
57
name: Build and run tests

on:
  push:
  pull_request:

env:
  PKG_NAME: texext

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - python-version: 3.7
            pip_dep_var: "-r test-requirements.txt"
          - python-version: 3.8
            pip_dep_var: "-r test-requirements.txt"
          - python-version: 3.9
            pip_dep_var: "-r test-requirements.txt"
          - python-version: "3.10"
            pip_dep_var: "-r test-requirements.txt"
          - python-version: 3.7
            # Minimum dependencies; check against test-requirements.txt
            pip_dep_var: "sphinx==4 sympy==1.0 matplotlib==3.1.0 docutils==0.14 sphinxtesters==0.2.3"
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          submodules: true
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install specified dependencies
        run: pip install $PIP_DEPENDS
        env:
          PIP_DEPENDS:  ${{ matrix.pip_dep_var }}
      - name: Install coverage dependencies
        run: |
          pip install pytest-cov
      - name: Install package
        run: |
          pip install .
      - name: Run tests
        run: |
          mkdir tmp
          cd tmp
          pytest --log-level DEBUG --cov-config=../.coveragerc --cov=$PKG_NAME --doctest-modules --pyargs $PKG_NAME
      - name: Collect code coverage data
        run: |
          coverage xml --data-file=tmp/.coverage
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v2
        with:
          fail_ci_if_error: true