|
| 1 | +--- |
| 2 | +name: Tests |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + tests: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + python-version: [3.5, 3.6, 3.7, 3.8] |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + - name: Set up Python ${{ matrix.python-version }} |
| 15 | + uses: actions/setup-python@v2 |
| 16 | + with: |
| 17 | + python-version: ${{ matrix.python-version }} |
| 18 | + - name: Ensure latest setuptools |
| 19 | + run: | |
| 20 | + python -m pip install --upgrade pip setuptools |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + python -m pip install coverage tox tox-factor unittest-xml-reporting |
| 24 | + - name: Run tox |
| 25 | + run: | |
| 26 | + python -m pip --version |
| 27 | + python -m tox --version |
| 28 | + python -m tox -f py$(python --version 2>&1 | cut -c 8,10) |
| 29 | + - name: Coverage reporting |
| 30 | + run: | |
| 31 | + coverage combine |
| 32 | + coverage report -m |
| 33 | + coverage xml |
| 34 | + coverage html |
| 35 | + - name: Publish coverage results |
| 36 | + uses: codecov/codecov-action@v1 |
| 37 | + |
| 38 | + |
| 39 | + isort: |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v2 |
| 43 | + - name: Set up Python |
| 44 | + uses: actions/setup-python@v2 |
| 45 | + with: |
| 46 | + python-version: 3.8 |
| 47 | + - name: Ensure latest setuptools |
| 48 | + run: | |
| 49 | + python -m pip install --upgrade pip setuptools |
| 50 | + - name: Install dependencies |
| 51 | + run: | |
| 52 | + python -m pip install tox |
| 53 | + - name: Run tox |
| 54 | + run: | |
| 55 | + python -m pip --version |
| 56 | + python -m tox --version |
| 57 | + python -m tox -e isort,lint,docs |
| 58 | +
|
| 59 | +
|
| 60 | + warnings: |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - name: Set up Python |
| 65 | + uses: actions/setup-python@v2 |
| 66 | + with: |
| 67 | + python-version: 3.8 |
| 68 | + - name: Ensure latest setuptools |
| 69 | + run: | |
| 70 | + python -m pip install --upgrade pip setuptools |
| 71 | + - name: Install dependencies |
| 72 | + run: | |
| 73 | + python -m pip install tox |
| 74 | + - name: Run tox |
| 75 | + run: | |
| 76 | + python -m pip --version |
| 77 | + python -m tox --version |
| 78 | + python -m tox -e warnings |
0 commit comments