forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (92 loc) · 4.2 KB
/
all_lint_checks.yml
File metadata and controls
93 lines (92 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Lint checks
permissions: read-all
on:
merge_group:
types: [checks_requested]
push:
branches:
- develop
- release-*
pull_request:
branches:
- develop
- release-*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
backend_lint:
name: Backend
runs-on: ubuntu-22.04
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
- name: Third Party Size Check
if: startsWith(github.head_ref, 'update-changelog-for-release') == false
run: python -m scripts.third_party_size_check
- 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
runs-on: ubuntu-22.04
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
- 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
runs-on: ubuntu-22.04
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
- 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
runs-on: ubuntu-22.04
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
- 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 }}