test_cov.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # This is a basic workflow to help you get started with Actions
  2. name: coverage
  3. # Controls when the workflow will run
  4. on:
  5. # Triggers the workflow on push or pull request events but only for the master branch
  6. push:
  7. branches: master
  8. pull_request:
  9. branches: master
  10. # Allows you to run this workflow manually from the Actions tab
  11. workflow_dispatch:
  12. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  13. jobs:
  14. run-codecov:
  15. runs-on: ubuntu-latest
  16. timeout-minutes: 10
  17. strategy:
  18. matrix:
  19. python-version: [3.8.x]
  20. steps:
  21. - name: Checkout master
  22. uses: actions/checkout@v2
  23. - name: Setup Python
  24. uses: actions/setup-python@v2
  25. with:
  26. python-version: ${{ matrix.python }}
  27. - name: Install dependencies
  28. run: |
  29. python -m pip install --upgrade pip
  30. python -m pip install -r requirements/coverage.txt
  31. - name: Run test suite
  32. run: |
  33. python -m pytest --cov=redmail --cov-report=xml redmail/test
  34. - name: Upload test coverage
  35. uses: codecov/codecov-action@v2