forked from chaiNNer-org/chaiNNer
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.67 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
# This is a basic workflow to help you get started with Actions
name: Lint
# Controls when the workflow will run
on:
pull_request:
branches: ['*']
types:
- opened
- synchronize
- closed
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
backend-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Black
run: black backend/
- name: pylint
run: pylint backend/ --output-format=colorized --disable="C,R" --fail-under=10
- name: pyright
run: pyright backend/
frontend-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
# Node v14 comes with npm@6.x by default.
# This version of npm does NOT install peer deps by default which is required by some of our deps
- run: npm i -g npm@7
- run: npm ci
- name: eslint
run: npm run lint-js-ci
- name: typescript
run: npx tsc