python-app.yml 944 B

123456789101112131415161718192021222324252627282930313233
  1. # This workflow will install Python dependencies, run tests and lint with a single version of Python
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
  3. name: Python application
  4. on:
  5. push:
  6. pull_request:
  7. jobs:
  8. test:
  9. name: Test on ${{ matrix.os }}
  10. runs-on: ${{ matrix.os }}
  11. strategy:
  12. matrix:
  13. python: [2.7, 3.5, 3.6, 3.7, 3.8]
  14. os: [ubuntu-latest, windows-latest, macOS-latest]
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Set up Python ${{ matrix.python }}
  18. uses: actions/setup-python@v2
  19. with:
  20. python-version: ${{ matrix.python }}
  21. - name: Install dependencies
  22. run: |
  23. python -m pip install --upgrade pip
  24. pip install flake8 pytest
  25. if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
  26. - name: Run tests
  27. run: |
  28. python metrix++.py test