-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 993 Bytes
/
ci.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
name: Froide CI
on:
push:
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- uses: actions/cache@v1
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
restore-keys: |
v0-${{ runner.os }}-pip-lint-
v0-${{ runner.os }}-pip-
- name: Install dependencies # TODO: move to requirements.txt
run: |
pip install flake8 black isort
yarn install
- name: Run flake8
run: flake8 froide_campaign --statistics
- name: Run black
run: black --check froide_campaign
- name: Run isort
run: isort --check froide_campaign
- name: Run eslint
run: yarn lint