build.yml 812 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Build
  2. on:
  3. push:
  4. branches: ["master"]
  5. pull_request:
  6. jobs:
  7. linting:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v3
  11. - name: Setup python
  12. uses: actions/setup-python@v4
  13. with:
  14. python-version: "3.x"
  15. - name: Apply pre-commit
  16. uses: pre-commit/action@v3.0.0
  17. with:
  18. extra_args: --all-files
  19. test-production:
  20. runs-on: ubuntu-latest
  21. strategy:
  22. fail-fast: false
  23. steps:
  24. - uses: actions/checkout@v3
  25. - name: Setup python
  26. uses: actions/setup-python@v4
  27. with:
  28. python-version: "3.x"
  29. - name: Run tests
  30. run: |
  31. pip install . -U
  32. pip install -r requirements-dev.txt
  33. python setup.py sdist
  34. pytest -vv --cov --profile