-
Notifications
You must be signed in to change notification settings - Fork 59
75 lines (61 loc) · 1.91 KB
/
precommit.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
name: Pre-commit checks
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
python-pre-commit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: false
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# ----- install dependencies -----
#----------------------------------------------
- name: Install dependencies
run: |
poetry install --no-interaction --no-root --with dev
- name: Lint check
run: pylint --disable=R,C application_examples examples
- name: Code style check
run: black . --check
- name: Imports sort check
uses: isort/isort-action@master
- name: Static check
uses: jakebailey/pyright-action@v2
continue-on-error: true
with:
pylance-version: latest-release
js-pre-commit:
name: JS Pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
working-directory: ./javascript-sdk
run: npm install
- name: Run ESLint
working-directory: ./javascript-sdk
run: npm run lint
- name: Run Prettier
working-directory: ./javascript-sdk
run: npx prettier --check .