File: test.yml

package info (click to toggle)
python-executing 2.2.1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,608 kB
  • sloc: python: 10,386; sh: 48; makefile: 10
file content (67 lines) | stat: -rw-r--r-- 2,240 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Tests

on:
  push:
    branches:
      - master
  pull_request:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        python-version: [3.8, 3.9, '3.10', '3.11', '3.12' ,'3.13' ,3.14-dev]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python --version
        pip install -U pip
        pip install --upgrade coveralls setuptools setuptools_scm pep517 .[tests]
        pip install .
    - name: Mypy testing (<3.11)
      run: |
        pip install mypy==0.910
        python -m mypy executing --exclude=executing/_position_node_finder.py
      # fromJson because https://github.community/t/passing-an-array-literal-to-contains-function-causes-syntax-error/17213/3
      if: ${{ !contains(fromJson('["pypy-3.6", "3.11","3.12","3.13","3.14-dev"]'), matrix.python-version) }}
      # pypy < 3.8 very doesn't work
    - name: Mypy testing (3.11)
      run: |
        pip install mypy==0.971
        python -m mypy executing
      # fromJson because https://github.community/t/passing-an-array-literal-to-contains-function-causes-syntax-error/17213/3
      # TODO: enable typechecking for 3.12
      if: ${{ contains(fromJson('["3.11"]'), matrix.python-version) }}
      # only >=3.11 use _position_node_finder.py
    - name: Test
      env:
        EXECUTING_SLOW_TESTS: 1
      run: |
        # COVERAGE_PROCESS_START defines the path to the coverage config for coverage-enable-subprocess
        export COVERAGE_PROCESS_START=${GITHUB_WORKSPACE}/setup.cfg
        coverage run -m pytest tests
        # combine the coverage of all subprocesses
        coverage combine
        coverage report -m
    - name: Coveralls Python
      uses: AndreMiras/coveralls-python-action@v20201129
      with:
        parallel: true
        flag-name: test-${{ matrix.python-version }}

  coveralls_finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls Finished
        uses: AndreMiras/coveralls-python-action@v20201129
        with:
          parallel-finished: true