This repository has been archived by the owner on May 6, 2024. It is now read-only.
Lintcheck Python #3619
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Lintcheck Python | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.py" | |
pull_request: | |
paths: | |
- "**.py" | |
schedule: | |
- cron: "0 6,18 * * *" | |
jobs: | |
check_python: | |
name: "Black & flake8" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python 3.8 env | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.8" | |
- name: Clone NLE repo | |
uses: actions/checkout@v2 | |
- name: Ensure latest pip | |
run: "python -m pip install -q --upgrade pip" | |
- name: Install python linting deps | |
run: "pip install -q black flake8 flake8-bugbear isort" | |
- name: Run black | |
run: "black --check --diff ." | |
- name: Run flake8 | |
run: "flake8" | |
- name: Run isort | |
run: "isort -c --diff nle/" | |
... |