|
| 1 | +name:Test |
| 2 | + |
| 3 | +on: |
| 4 | +push: |
| 5 | +branches: |
| 6 | + -master |
| 7 | +pull_request: |
| 8 | +branches: |
| 9 | + -master |
| 10 | + |
| 11 | +env: |
| 12 | +PY_COLORS:1 |
| 13 | + |
| 14 | +jobs: |
| 15 | +unit: |
| 16 | +runs-on:ubuntu-20.04 |
| 17 | +strategy: |
| 18 | +matrix: |
| 19 | +include: |
| 20 | + -python-version:3.6 |
| 21 | +toxenv:py36 |
| 22 | + -python-version:3.7 |
| 23 | +toxenv:py37 |
| 24 | + -python-version:3.8 |
| 25 | +toxenv:py38 |
| 26 | + -python-version:3.9 |
| 27 | +toxenv:py39 |
| 28 | +steps: |
| 29 | + -uses:actions/checkout@v2 |
| 30 | + -name:Set up Python ${{ matrix.python-version }} |
| 31 | +uses:actions/setup-python@v2 |
| 32 | +with: |
| 33 | +python-version:${{ matrix.python-version }} |
| 34 | + -name:Install dependencies |
| 35 | +run:pip install tox pytest-github-actions-annotate-failures |
| 36 | + -name:Run tests |
| 37 | +env: |
| 38 | +TOXENV:${{ matrix.toxenv }} |
| 39 | +run:tox |
| 40 | + |
| 41 | +functional: |
| 42 | +runs-on:ubuntu-20.04 |
| 43 | +strategy: |
| 44 | +matrix: |
| 45 | +toxenv:[py_func_v4, cli_func_v4] |
| 46 | +steps: |
| 47 | + -uses:actions/checkout@v2 |
| 48 | + -name:Set up Python |
| 49 | +uses:actions/setup-python@v2 |
| 50 | +with: |
| 51 | +python-version:3.9 |
| 52 | + -name:Install dependencies |
| 53 | +run:pip install tox pytest-github-actions-annotate-failures |
| 54 | + -name:Run tests |
| 55 | +env: |
| 56 | +TOXENV:${{ matrix.toxenv }} |
| 57 | +run:tox |
| 58 | + |
| 59 | +coverage: |
| 60 | +runs-on:ubuntu-20.04 |
| 61 | +steps: |
| 62 | + -uses:actions/checkout@v2 |
| 63 | + -name:Set up Python ${{ matrix.python-version }} |
| 64 | +uses:actions/setup-python@v2 |
| 65 | +with: |
| 66 | +python-version:3.9 |
| 67 | + -name:Install dependencies |
| 68 | +run:pip install tox pytest-github-actions-annotate-failures |
| 69 | + -name:Run tests |
| 70 | +env: |
| 71 | +PY_COLORS:1 |
| 72 | +TOXENV:cover |
| 73 | +run:tox |
| 74 | + -name:Upload codecov coverage |
| 75 | +uses:codecov/codecov-action@v1 |
| 76 | +with: |
| 77 | +files:./coverage.xml |
| 78 | +flags:unit |
| 79 | +fail_ci_if_error:true |