python-non-master.yml 972 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Python CI (branches)
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. - '!master'
  7. pull_request:
  8. branches:
  9. - 'master'
  10. jobs:
  11. build:
  12. if: github.ref != 'refs/heads/master'
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Set up Python ${{ matrix.python-version }}
  20. uses: actions/setup-python@v2
  21. with:
  22. python-version: ${{ matrix.python-version }}
  23. - name: Install dependencies
  24. run: |
  25. python -m pip install --upgrade pip
  26. if [ -f requirements/dev.txt ]; then pip install -r requirements/dev.txt; fi
  27. - name: Lint with flake8
  28. run: |
  29. flake8 . --count --show-source --statistics
  30. - name: Lint with pylint
  31. run: |
  32. pylint howdoi *.py --rcfile=.pylintrc
  33. - name: Test with nose
  34. if: runner.os == 'Linux'
  35. shell: 'script -q -e -c "bash {0}"'
  36. run: nose2