-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (74 loc) · 1.82 KB
/
lint.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
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
name: Lint
on: [pull_request]
permissions:
contents: read
jobs:
pr-title:
runs-on: ubuntu-latest
name: Check PR title format
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check PR title
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
editorconfig:
runs-on: ubuntu-latest
name: Check editorconfig
steps:
- uses: actions/checkout@v4
- run: pip install editorconfig-checker=="2.7.3"
- run: ec
typos:
runs-on: ubuntu-latest
name: Check spelling
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]
license-headers:
runs-on: ubuntu-latest
name: Check license headers
steps:
- uses: actions/checkout@v4
- run: cargo install [email protected]
- run: licensesnip check
prettier:
runs-on: ubuntu-latest
name: Check frontent code formatting
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: '--write **/*.{js,ts,tsx,css,html}'
black:
runs-on: ubuntu-latest
name: Check Python formatting
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
check-all:
name: Check if all lint jobs succeeded
if: always()
needs:
- pr-title
- editorconfig
- typos
- license-headers
- prettier
- black
runs-on: ubuntu-latest
steps:
- name: Decide whether all needed jobs succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}