mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 01:46:08 +00:00
Add black lint & workflow reorganization
This commit is contained in:
51
.github/workflows/lint.yml
vendored
Normal file
51
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: lint
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [ opened, edited ]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [ '3.8', '3.x' ]
|
||||
|
||||
name: check ${{ matrix.python-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up CPython ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
id: install-deps
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel black
|
||||
pip install -U -r requirements.txt
|
||||
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install pyright
|
||||
run: |
|
||||
npm install -g pyright
|
||||
|
||||
- name: Run pyright
|
||||
run: |
|
||||
# It is OK for the types to not pass at this stage
|
||||
# We are just running it as a quick reference check
|
||||
pyright || echo "Type checking did not pass"
|
||||
|
||||
- name: Run black
|
||||
if: ${{ always() && steps.install-deps.outcome == 'success' }}
|
||||
run: |
|
||||
black --check --verbose discord
|
Reference in New Issue
Block a user