1
0

test.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Test
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. os: [ubuntu-latest, macos-latest, windows-latest]
  9. python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
  10. steps:
  11. - uses: actions/checkout@v2
  12. - uses: actions/setup-python@v2
  13. with:
  14. python-version: ${{ matrix.python-version }}
  15. - name: Install from source
  16. run: python -m pip install --editable .[test,bcrypt]
  17. - name: Run tests
  18. run: python setup.py test
  19. - name: Upload coverage to Coveralls
  20. if: github.event_name == 'push'
  21. env:
  22. COVERALLS_PARALLEL: true
  23. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  24. run: |
  25. python -m pip install coveralls
  26. python -m coveralls --service=github
  27. coveralls-finish:
  28. needs: test
  29. if: github.event_name == 'push'
  30. runs-on: ubuntu-latest
  31. steps:
  32. - uses: actions/setup-python@v2
  33. with:
  34. python-version: 3.x
  35. - name: Finish Coveralls parallel builds
  36. env:
  37. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  38. run: |
  39. python -m pip install coveralls
  40. python -m coveralls --service=github --finish