python.yml 899 B

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