main.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # This is a basic workflow to help you get started with Actions
  2. name: build
  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-tests:
  15. # The type of runner that the job will run on
  16. runs-on: ubuntu-latest
  17. timeout-minutes: 10
  18. strategy:
  19. matrix:
  20. python-version: [3.7.x, 3.8.x, 3.10.x, 3.11.x]
  21. # Steps represent a sequence of tasks that will be executed as part of the job
  22. steps:
  23. - name: Checkout master
  24. uses: actions/checkout@v2
  25. - name: Setup Python
  26. uses: actions/setup-python@v2
  27. with:
  28. python-version: ${{ matrix.python-version }}
  29. - name: Install dependencies
  30. run: |
  31. python -m pip install --upgrade pip
  32. python -m pip install .[test]
  33. - name: Run test suite
  34. working-directory: ./requirements
  35. run: |
  36. python -m pytest --pyargs redmail -W error::UserWarning -W error::FutureWarning -W error::DeprecationWarning
  37. # Seems there is a possible problem with pytest-cov parallelization
  38. #- name: Run test suite
  39. # run: |
  40. # python -m pytest --pyargs redengine --cov-report=xml --cov-config=.coveragerc
  41. #- name: Upload test coverage
  42. # uses: codecov/codecov-action@v2