You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. name: Lint
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. branches: [master]
  7. jobs:
  8. check-commits:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: webiny/action-conventional-commits@v1.0.3
  13. check-linting:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@v3
  17. - name: Set up Python 3.10
  18. uses: actions/setup-python@v3
  19. with:
  20. python-version: "3.10"
  21. - name: Install dependencies
  22. run: |
  23. python -m pip install --upgrade pip
  24. python -m pip install poetry
  25. poetry install
  26. - name: Check linting, formatting
  27. run: |
  28. poetry run tox -e check
  29. check-docs:
  30. runs-on: ubuntu-latest
  31. needs:
  32. - check-commits
  33. - check-linting
  34. steps:
  35. - uses: actions/checkout@v3
  36. - name: Set up Python 3.10
  37. uses: actions/setup-python@v3
  38. with:
  39. python-version: "3.10"
  40. - name: Install dependencies
  41. run: |
  42. python -m pip install --upgrade pip
  43. python -m pip install poetry
  44. poetry install
  45. - name: Check documentation build
  46. run: |
  47. poetry run tox -e docs
  48. test:
  49. runs-on: ubuntu-latest
  50. strategy:
  51. fail-fast: false
  52. matrix:
  53. python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
  54. needs:
  55. - check-commits
  56. - check-linting
  57. steps:
  58. - uses: actions/checkout@v3
  59. - name: Set up Python ${{ matrix.python-version }}
  60. uses: actions/setup-python@v3
  61. with:
  62. python-version: ${{ matrix.python-version }}
  63. - uses: docker-practice/actions-setup-docker@master
  64. - name: Install dependencies
  65. run: |
  66. python -m pip install --upgrade pip
  67. python -m pip install poetry
  68. poetry install
  69. - name: Run tests
  70. run: |
  71. poetry run tox -e tests
  72. - name: Keycloak logs
  73. run: |
  74. cat keycloak_test_logs.txt
  75. build:
  76. runs-on: ubuntu-latest
  77. needs:
  78. - test
  79. - check-docs
  80. steps:
  81. - uses: actions/checkout@v3
  82. - name: Set up Python 3.10
  83. uses: actions/setup-python@v3
  84. with:
  85. python-version: "3.10"
  86. - name: Install dependencies
  87. run: |
  88. python -m pip install --upgrade pip
  89. python -m pip install poetry
  90. poetry install
  91. - name: Run build
  92. run: |
  93. poetry run tox -e build