|
| 1 | +# TODO: Line 14, enable os: windows-latest |
| 2 | +# TODO: Line 15, enable python-version: 3.5 |
| 3 | +# TODO: Line 36, enable pytest --doctest-modules |
| 4 | + |
| 5 | +name: Python_tests |
| 6 | +on: [push, pull_request] |
| 7 | +jobs: |
| 8 | + Python_tests: |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + max-parallel: 15 |
| 13 | + matrix: |
| 14 | + os: [macos-latest, ubuntu-latest] # , windows-latest] |
| 15 | + python-version: [2.7, 3.6, 3.7, 3.8] # 3.5, |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v1 |
| 18 | + - name: Set up Python ${{ matrix.python-version }} |
| 19 | + uses: actions/setup-python@v1 |
| 20 | + with: |
| 21 | + python-version: ${{ matrix.python-version }} |
| 22 | + - name: Install dependencies |
| 23 | + run: | |
| 24 | + python -m pip install --upgrade pip |
| 25 | + pip install flake8 pytest # -r requirements.txt |
| 26 | + - name: Lint with flake8 |
| 27 | + if: matrix.os == 'ubuntu-latest' |
| 28 | + run: | |
| 29 | + # stop the build if there are Python syntax errors or undefined names |
| 30 | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
| 31 | + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
| 32 | + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 33 | + - name: Test with pytest |
| 34 | + run: pytest |
| 35 | + # - name: Run doctests with pytest |
| 36 | + # run: pytest --doctest-modules |
0 commit comments