/
githubmirror
/
oppia
Обзор
Документация
Войти
/
githubmirror
/
oppia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
.github/workflows/all_lint_checks.yml
148 строк
6 KB
kundan
Fix #25031: Pin develop SHA for backend coverage checks to ensure consistency across CI jobs (#25318)
01 апр 2026, 09:59
Не верифицирован
01 апр 2026, 09:59
dd3bb47
Код
Авторство
О чём код?
name: Lint checks permissions: read-all on: merge_group: types: - checks_requested - destroyed push: branches: - develop - release-* pull_request: branches: - develop - release-* types: - opened - synchronize - reopened - closed concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref || github.run_id }} cancel-in-progress: true jobs: setup_merge_sha: name: Capture develop SHA runs-on: ubuntu-22.04 outputs: develop_sha: ${{ steps.get_sha.outputs.sha }} steps: - name: Get latest develop SHA id: get_sha run: | SHA=$(git ls-remote https://github.com/oppia/oppia.git refs/heads/develop | awk '{print $1}') echo "sha=$SHA" >> "$GITHUB_OUTPUT" backend_lint: name: Backend needs: setup_merge_sha runs-on: ubuntu-22.04 # Skip the job if we were only launched to cancel running jobs via the concurrency key above. if: ${{ ! ( (github.event_name == 'merge_group' && github.event.action == 'destroyed') || (github.event_name == 'pull_request' && github.event.action == 'closed') ) }} steps: - name: Checkout repository so that local actions can be used uses: actions/checkout@v4 - name: Merge develop and set up dependencies uses: ./.github/actions/merge-develop-and-set-up-dependencies with: merge_sha: ${{ needs.setup_merge_sha.outputs.develop_sha }} - name: Third Party Size Check if: startsWith(github.head_ref, 'update-changelog-for-release') == false run: python -m scripts.third_party_size_check - name: Check Unused I18N Keys if: startsWith(github.head_ref, 'update-changelog-for-release') == false run: python -m scripts.check_unused_i18n_keys - name: Run Lint Checks if: startsWith(github.head_ref, 'update-changelog-for-release') == false run: python -m scripts.linters.run_lint_checks --shard other --verbose - name: Report failure if failed on oppia/oppia develop branch if: ${{ failure() && github.event_name == 'push' && github.repository == 'oppia/oppia' && github.ref == 'refs/heads/develop'}} uses: ./.github/actions/send-webhook-notification with: message: "Lint checks failed on the upstream develop branch." webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }} frontend_lint: name: Custom ESLint checks needs: setup_merge_sha runs-on: ubuntu-22.04 # Skip the job if we were only launched to cancel running jobs via the concurrency key above. if: ${{ ! ( (github.event_name == 'merge_group' && github.event.action == 'destroyed') || (github.event_name == 'pull_request' && github.event.action == 'closed') ) }} steps: - name: Checkout repository so that local actions can be used uses: actions/checkout@v4 - name: Merge develop and set up dependencies uses: ./.github/actions/merge-develop-and-set-up-dependencies with: merge_sha: ${{ needs.setup_merge_sha.outputs.develop_sha }} - name: Run ESLint Tests if: startsWith(github.head_ref, 'update-changelog-for-release') == false run: python -m scripts.run_custom_eslint_tests - name: Report failure if failed on oppia/oppia develop branch if: ${{ failure() && github.event_name == 'push' && github.repository == 'oppia/oppia' && github.ref == 'refs/heads/develop'}} uses: ./.github/actions/send-webhook-notification with: message: "ESLint checks failed on the upstream develop branch." webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }} frontend_formatter: name: Frontend formatting with prettier needs: setup_merge_sha runs-on: ubuntu-22.04 # Skip the job if we were only launched to cancel running jobs via the concurrency key above. if: ${{ ! ( (github.event_name == 'merge_group' && github.event.action == 'destroyed') || (github.event_name == 'pull_request' && github.event.action == 'closed') ) }} steps: - name: Checkout repository so that local actions can be used uses: actions/checkout@v4 - name: Merge develop and set up dependencies uses: ./.github/actions/merge-develop-and-set-up-dependencies with: merge_sha: ${{ needs.setup_merge_sha.outputs.develop_sha }} - name: Prettify code run: npx prettier --check . - name: Explain how to fix the issue if: ${{ failure() }} run: echo "Read https://github.com/oppia/oppia/wiki/Formatters to understand how to fix this issue." - name: Report failure if failed on oppia/oppia develop branch if: ${{ failure() && github.event_name == 'push' && github.repository == 'oppia/oppia' && github.ref == 'refs/heads/develop'}} uses: ./.github/actions/send-webhook-notification with: message: "Prettier formatting failed on the upstream develop branch." webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }} black_formatter: name: Frontend formatting with prettier needs: setup_merge_sha runs-on: ubuntu-22.04 # Skip the job if we were only launched to cancel running jobs via the concurrency key above. if: ${{ ! ( (github.event_name == 'merge_group' && github.event.action == 'destroyed') || (github.event_name == 'pull_request' && github.event.action == 'closed') ) }} steps: - name: Checkout repository so that local actions can be used uses: actions/checkout@v4 - name: Merge develop and set up dependencies uses: ./.github/actions/merge-develop-and-set-up-dependencies with: merge_sha: ${{ needs.setup_merge_sha.outputs.develop_sha }} - name: Black formatting run: black --check . - name: Explain how to fix the issue if: ${{ failure() }} run: echo "Read https://github.com/oppia/oppia/wiki/Formatters to understand how to fix this issue." - name: Report failure if failed on oppia/oppia develop branch if: ${{ failure() && github.event_name == 'push' && github.repository == 'oppia/oppia' && github.ref == 'refs/heads/develop'}} uses: ./.github/actions/send-webhook-notification with: message: "Black formatting failed on the upstream develop branch." webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }}