-
-
Notifications
You must be signed in to change notification settings - Fork 146
51 lines (42 loc) · 1.16 KB
/
on_pr_check_code_format.yml
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
name: Check Code Format
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
check_js_code_format:
name: Check JS code format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Check format
uses: creyD/[email protected]
with:
prettier_options: --check .
dry: true
only_changed: true
github_token: ${{ secrets.GITHUB_TOKEN }}
check_py_code_format:
name: Check PY code format
runs-on: ubuntu-latest
needs: check_js_code_format
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Check format
uses: psf/black@stable
with:
options: '--exclude="3rd party"'
src: "."