generated from nyu-software-engineering/containerized-app-exercise
-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (31 loc) · 986 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 system dependencies
run: |
sudo apt-get update
sudo apt-get install -y portaudio19-dev
sudo apt-get install -y ffmpeg
- 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 .