Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. name: Style check
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. concurrency:
  7. group: style-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. python-style:
  11. name: Python Style
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout code
  15. uses: actions/checkout@v4
  16. with:
  17. persist-credentials: false
  18. - name: Check changed files
  19. id: changed-files
  20. uses: tj-actions/changed-files@v45
  21. with:
  22. files: |
  23. api/**
  24. .github/workflows/style.yml
  25. - name: Setup UV and Python
  26. if: steps.changed-files.outputs.any_changed == 'true'
  27. uses: ./.github/actions/setup-uv
  28. with:
  29. uv-lockfile: api/uv.lock
  30. enable-cache: false
  31. - name: Install dependencies
  32. if: steps.changed-files.outputs.any_changed == 'true'
  33. run: uv sync --project api --dev
  34. - name: Ruff check
  35. if: steps.changed-files.outputs.any_changed == 'true'
  36. run: |
  37. uv run --directory api ruff --version
  38. uv run --directory api ruff check ./
  39. uv run --directory api ruff format --check ./
  40. - name: Dotenv check
  41. if: steps.changed-files.outputs.any_changed == 'true'
  42. run: uv run --project api dotenv-linter ./api/.env.example ./web/.env.example
  43. - name: Lint hints
  44. if: failure()
  45. run: echo "Please run 'dev/reformat' to fix the fixable linting errors."
  46. web-style:
  47. name: Web Style
  48. runs-on: ubuntu-latest
  49. defaults:
  50. run:
  51. working-directory: ./web
  52. steps:
  53. - name: Checkout code
  54. uses: actions/checkout@v4
  55. with:
  56. persist-credentials: false
  57. - name: Check changed files
  58. id: changed-files
  59. uses: tj-actions/changed-files@v45
  60. with:
  61. files: web/**
  62. - name: Install pnpm
  63. uses: pnpm/action-setup@v4
  64. with:
  65. version: 10
  66. run_install: false
  67. - name: Setup NodeJS
  68. uses: actions/setup-node@v4
  69. if: steps.changed-files.outputs.any_changed == 'true'
  70. with:
  71. node-version: 22
  72. cache: pnpm
  73. cache-dependency-path: ./web/package.json
  74. - name: Web dependencies
  75. if: steps.changed-files.outputs.any_changed == 'true'
  76. run: pnpm install --frozen-lockfile
  77. - name: Web style check
  78. if: steps.changed-files.outputs.any_changed == 'true'
  79. run: pnpm run lint
  80. docker-compose-template:
  81. name: Docker Compose Template
  82. runs-on: ubuntu-latest
  83. steps:
  84. - name: Checkout code
  85. uses: actions/checkout@v4
  86. with:
  87. persist-credentials: false
  88. - name: Check changed files
  89. id: changed-files
  90. uses: tj-actions/changed-files@v45
  91. with:
  92. files: |
  93. docker/generate_docker_compose
  94. docker/.env.example
  95. docker/docker-compose-template.yaml
  96. docker/docker-compose.yaml
  97. - name: Generate Docker Compose
  98. if: steps.changed-files.outputs.any_changed == 'true'
  99. run: |
  100. cd docker
  101. ./generate_docker_compose
  102. - name: Check for changes
  103. if: steps.changed-files.outputs.any_changed == 'true'
  104. run: git diff --exit-code
  105. superlinter:
  106. name: SuperLinter
  107. runs-on: ubuntu-latest
  108. steps:
  109. - name: Checkout code
  110. uses: actions/checkout@v4
  111. with:
  112. persist-credentials: false
  113. - name: Check changed files
  114. id: changed-files
  115. uses: tj-actions/changed-files@v45
  116. with:
  117. files: |
  118. **.sh
  119. **.yaml
  120. **.yml
  121. **Dockerfile
  122. dev/**
  123. - name: Super-linter
  124. uses: super-linter/super-linter/slim@v7
  125. if: steps.changed-files.outputs.any_changed == 'true'
  126. env:
  127. BASH_SEVERITY: warning
  128. DEFAULT_BRANCH: main
  129. FILTER_REGEX_INCLUDE: pnpm-lock.yaml
  130. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  131. IGNORE_GENERATED_FILES: true
  132. IGNORE_GITIGNORED_FILES: true
  133. VALIDATE_BASH: true
  134. VALIDATE_BASH_EXEC: true
  135. # FIXME: temporarily disabled until api-docker.yaml's run script is fixed for shellcheck
  136. # VALIDATE_GITHUB_ACTIONS: true
  137. VALIDATE_DOCKERFILE_HADOLINT: true
  138. VALIDATE_XML: true
  139. VALIDATE_YAML: true