-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (52 loc) · 1.65 KB
/
linting.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
name: Lint
on:
- push
- pull_request
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pip deps
run: |
python -m pip install --upgrade pip fire poetry
cd sema4ai
poetry config virtualenvs.prefer-active-python true
poetry install
- name: Install prettier
run: |
npm install -g [email protected]
- name: Prettier Sema4.ai (yarn prettier --write vscode-client/**/*.ts to format files locally)
working-directory: ./sema4ai
if: always()
run: prettier --check vscode-client/**/*.ts
- name: ruff format check sema4ai
working-directory: ./sema4ai
if: always()
run: |
echo $PWD
ls -la
# Fix with python -m dev ruff_format --format
poetry run python -m dev ruff_format
- name: Update codegen deps
run: python -m dev codegen
working-directory: ./sema4ai
env:
PYTHONPATH: src
- name: mypy sema4ai
if: always()
working-directory: ./sema4ai
run: |
poetry run mypy --follow-imports=silent --show-column-numbers $PWD/src $PWD/tests $PWD/codegen
- name: mypy sema4ai-python-ls-core
if: always()
working-directory: ./sema4ai-python-ls-core
run: |
poetry install
poetry run mypy --follow-imports=silent --show-column-numbers $PWD/src $PWD/tests