-
Notifications
You must be signed in to change notification settings - Fork 9
132 lines (131 loc) · 4 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Linter
on: [push]
jobs:
Black_bootstrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- run: pipenv install --dev --deploy
- name: Run Black
run: pipenv run black --check --exclude \{\{cookiecutter .
flake8_bootstrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- run: pipenv install --dev --deploy
- name: Run flake8
run: pipenv run flake8 --extend-exclude server
Black:
strategy:
matrix:
fe_type: [react, vue]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- name: 🐍 Install python dependencies
run: pipenv install --dev --deploy
- run: |
config_file="cookiecutter/${{ matrix.fe_type }}_template.yaml"
pipenv run cookiecutter . --config-file $config_file --no-input -f
- name: Run Black
working-directory: ./my_project/server
run: |
pipenv install --dev --deploy
pipenv run black --check .
flake8:
strategy:
matrix:
fe_type: [react, vue]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- name: 🐍 Install python dependencies
run: pipenv install --dev --deploy
- run: |
config_file="cookiecutter/${{ matrix.fe_type }}_template.yaml"
pipenv run cookiecutter . --config-file $config_file --no-input -f
- name: Run flake8
working-directory: ./my_project/server
run: |
pipenv install --dev --deploy
pipenv run flake8
Lint_Web:
strategy:
matrix:
fe_type: [react, vue]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- name: 🐍 Install python dependencies
run: pipenv install --dev --deploy
- run: |
config_file="cookiecutter/${{ matrix.fe_type }}_template.yaml"
pipenv run cookiecutter . --config-file $config_file --no-input -f
- uses: actions/setup-node@v4
with:
node-version: 18
- name: 📦 Install dependencies
env:
NPM_CONFIG_PRODUCTION: false
working-directory: ./my_project/client
run: |
npm install
- name: 🆎 TypeCheck
working-directory: ./my_project/client
run: npm run tslint
- name: 🚧 ESLint
working-directory: ./my_project/client
run: npm run eslint
Lint_Mobile:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
- run: pipx install pipenv
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pipenv"
- name: 🐍 Install python dependencies
run: pipenv install --dev --deploy
- run: |
config_file="cookiecutter/rn_template.yaml"
pipenv run cookiecutter . --config-file $config_file --no-input -f
- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: 📦 Install dependencies
working-directory: ./my_project/mobile
run: npm install
- name: 🆎 TypeCheck
working-directory: ./my_project/mobile
run: npm run lint:tslint
- name: 🚧 ESLint
working-directory: ./my_project/mobile
run: npm run lint:eslint