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.

102 lines
2.5 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. keycloak-version: ["20.0", "21.0", "latest"]
  55. needs:
  56. - check-commits
  57. - check-linting
  58. env:
  59. KEYCLOAK_DOCKER_IMAGE_TAG: ${{ matrix.keycloak-version }}
  60. steps:
  61. - uses: actions/checkout@v3
  62. - name: Set up Python ${{ matrix.python-version }}
  63. uses: actions/setup-python@v3
  64. with:
  65. python-version: ${{ matrix.python-version }}
  66. - uses: docker-practice/actions-setup-docker@master
  67. - name: Install dependencies
  68. run: |
  69. python -m pip install --upgrade pip
  70. python -m pip install poetry
  71. poetry install
  72. - name: Run tests
  73. run: |
  74. poetry run tox -e tests
  75. - name: Keycloak logs
  76. run: |
  77. cat keycloak_test_logs.txt
  78. build:
  79. runs-on: ubuntu-latest
  80. needs:
  81. - test
  82. - check-docs
  83. steps:
  84. - uses: actions/checkout@v3
  85. - name: Set up Python 3.10
  86. uses: actions/setup-python@v3
  87. with:
  88. python-version: "3.10"
  89. - name: Install dependencies
  90. run: |
  91. python -m pip install --upgrade pip
  92. python -m pip install poetry
  93. poetry install
  94. - name: Run build
  95. run: |
  96. poetry run tox -e build