-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.1 KB
/
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
39
40
41
42
43
44
45
46
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Lint
os: ubuntu-latest
pyversion: '3.11'
nodeversion: '18'
lint: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyversion }}
- name: Set up Node ${{ matrix.nodeversion }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeversion }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U black flake8
npm install eslint --save-dev
- name: Lint Python
if: matrix.lint == 1
run: |
black --check ./*.py
flake8 ./*.py --max-line-length=89
- name: Lint JS
if: matrix.lint == 1
run: |
npx eslint src