pipeline.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Linting and tests
  2. on:
  3. pull_request:
  4. push:
  5. branches: ["main"]
  6. jobs:
  7. check-code-style:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. - uses: actions/setup-python@v2
  12. with:
  13. python-version: '3.6'
  14. - run: python -m pip install -e .[dev]
  15. - run: black --check --diff sydent/ tests/ matrix_is_test/ scripts/ setup.py
  16. - run: flake8 sydent/ tests/ matrix_is_test/ scripts/ setup.py
  17. - run: isort --check-only --diff sydent/ tests/ matrix_is_test/ scripts/ setup.py
  18. run-unit-tests:
  19. needs: [check-code-style]
  20. runs-on: ubuntu-latest
  21. strategy:
  22. matrix:
  23. python-version: ['3.6', '3.x']
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: actions/setup-python@v2
  27. with:
  28. python-version: ${{ matrix.python-version }}
  29. - run: python -m pip install -e .
  30. - run: trial tests
  31. run-matrix-is-tests:
  32. needs: [check-code-style]
  33. runs-on: ubuntu-latest
  34. strategy:
  35. matrix:
  36. python-version: ['3.6', '3.x']
  37. steps:
  38. - uses: actions/checkout@v2
  39. - uses: actions/setup-python@v2
  40. with:
  41. python-version: ${{ matrix.python-version }}
  42. - run: python -m pip install -e .
  43. - run: pip install git+https://github.com/matrix-org/matrix-is-tester.git
  44. - run: trial matrix_is_tester