make linting workflow reflect what is done locally (Makefile).

This commit is contained in:
fiatjaf 2020-09-02 22:06:53 -03:00
parent dc3d96c6a8
commit 753e9c5b15
4 changed files with 41 additions and 26 deletions

View file

@ -1,25 +1,33 @@
name: Run Linters
name: Linters
on: [push, pull_request]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
mypy:
black:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run MyPy python type checker
uses: jpetrucciani/mypy-check@master
with:
path: 'lnbits'
- uses: actions/checkout@v2
- run: sudo apt-get install python3-venv
- run: python3 -m venv venv
- run: ./venv/bin/pip install black
- run: make checkblack
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Check JS code formatting convention
uses: creyD/prettier_action@v2.2
with:
dry: True
prettier_options: --write lnbits/static/js/** lnbits/core/static/js/** lnbits/extensions/*/templates/**
- uses: actions/checkout@v2
- run: npm install
- run: make checkprettier
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install python3-venv
- run: sudo apt-get install libev-dev
- run: python3 -m venv venv
- run: ./venv/bin/pip install -r requirements.txt
- run: ./venv/bin/pip install mypy
- run: make mypy

View file

@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.8]
steps:
- uses: actions/checkout@v2