-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (36 loc) · 1015 Bytes
/
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
name: "lint"
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: 'dev-requirements.txt'
- name: Install Python dependencies
run: pip install -r dev-requirements.txt
- name: Install linters
run: |
sudo apt install jsonlint shellcheck
- name: jsonlint-php th/data.json
run: jsonlint-php $GITHUB_WORKSPACE/th/data.json
- name: format python files
run: |
black --check $(git ls-files "*.py")
- name: typecheck python files
run: |
pyright $(git ls-files "*.py")
- name: shellcheck
run: |
shellcheck --version
./scripts/shellcheck.sh
- name: import qualification
run: |
./scripts/check-imports.sh