* modify workflows to fit into one file, fix pyright workflow * remove redundant pip install * add check flag to black * use psf/black for black checker
38 lines
813 B
YAML
38 lines
813 B
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
pyright:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Setup node.js (for pyright)
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "14"
|
|
|
|
- name: Run type checking
|
|
run: |
|
|
npm install -g pyright
|
|
pip install .
|
|
pyright --lib --verifytypes discord --ignoreexternal
|
|
|
|
black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run linter
|
|
uses: psf/black@stable
|
|
with:
|
|
options: "--line-length 120 --check"
|
|
src: "./discord" |