Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 1 | name: Linters |
| 2 | |
| 3 | on: |
| 4 | pull_request: { } |
| 5 | |
| 6 | jobs: |
| 7 | |
| 8 | linters: |
| 9 | name: linters |
| 10 | runs-on: ubuntu-latest |
| 11 | steps: |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 12 | - uses: actions/checkout@v3 |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 13 | |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 14 | - name: Set up Python 3.10 |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 15 | uses: actions/setup-python@v4 |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 16 | with: |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 17 | python-version: '3.10' |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 18 | cache: pip |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 19 | |
| 20 | - name: Install and Run Pre-commit |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 21 | uses: pre-commit/action@v3.0.0 |
Ankush Menat | 5ada11b | 2021-10-20 14:53:49 +0530 | [diff] [blame] | 22 | |
Ankush Menat | ef7aefe | 2024-01-18 11:29:53 +0530 | [diff] [blame] | 23 | semgrep: |
| 24 | name: semgrep |
| 25 | runs-on: ubuntu-latest |
| 26 | steps: |
| 27 | - uses: actions/checkout@v3 |
| 28 | |
| 29 | - name: Set up Python 3.10 |
| 30 | uses: actions/setup-python@v4 |
| 31 | with: |
| 32 | python-version: '3.10' |
| 33 | cache: pip |
| 34 | |
Ankush Menat | cc1baae | 2021-10-22 21:43:50 +0530 | [diff] [blame] | 35 | - name: Download Semgrep rules |
Ankush Menat | 4ad2b85 | 2021-10-22 22:38:44 +0530 | [diff] [blame] | 36 | run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules |
Ankush Menat | cc1baae | 2021-10-22 21:43:50 +0530 | [diff] [blame] | 37 | |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 38 | - name: Download semgrep |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 39 | run: pip install semgrep |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 40 | |
| 41 | - name: Run Semgrep rules |
| 42 | run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness |