Set up the basic machine learning py #20
Workflow file for this run
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: check lint and format | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
if: ${{ hashFiles('**/*.py') != '' }} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pipenv | |
pipenv sync --dev --python $(which python) | |
pipenv shell --fancy --python $(which python) | |
- name: Lint with pylint | |
if: ${{ hashFiles('**/*.py') != '' }} | |
run: | | |
pipenv run pylint **/*.py | |
- name: Format with black | |
if: ${{ hashFiles('**/*.py') != '' }} | |
run: | | |
pipenv run black --diff --check . |