tests.yml 861 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Tests
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'dist/**'
  6. push:
  7. paths-ignore:
  8. - 'dist/**'
  9. jobs:
  10. tests:
  11. name: Python ${{ matrix.python-version }}
  12. runs-on: ubuntu-latest
  13. strategy:
  14. matrix:
  15. python-version:
  16. - '3.6'
  17. - '3.7'
  18. - '3.8'
  19. - '3.9'
  20. steps:
  21. - uses: actions/checkout@v2
  22. - uses: actions/setup-python@v2
  23. with:
  24. python-version: ${{ matrix.python-version }}
  25. - uses: actions/cache@v2
  26. with:
  27. path: ~/.cache/pip
  28. key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
  29. restore-keys: |
  30. ${{ runner.os }}-pip-
  31. - name: Upgrade packaging tools
  32. run: python -m pip install --upgrade pip setuptools virtualenv wheel
  33. - name: Run tests for ${{ matrix.python-version }}
  34. run: python -m unittest