Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces Linting (pylint) and Static Checking (mypy) for the SDK #411

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/check-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@ jobs:
- name: Checkout code by commit
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v3
- uses: actions/setup-python@v4
with:
go-version: "1.19"
id: go
python-version: '3.10'

- name: Ensure dependencies installed
shell: bash
run: |
make ensure-deps

- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r examples/requirements-examples.txt

- name: Run all checks
shell: bash
run: |
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/check-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check - lint

on:
pull_request:
types:
- assigned
- opened
- synchronize
- reopened
paths:
- "deepgram/**.py"

jobs:
checklint:
name: Check shell
# Only run this job if we're in the main repo, not a fork.
if: github.repository == 'deepgram/deepgram-python-sdk'
runs-on: ubuntu-latest
steps:

- name: Checkout code by commit
uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Ensure dependencies installed
shell: bash
run: |
make ensure-deps

- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r examples/requirements-examples.txt

- name: Run mdlint
run: |
make lint
53 changes: 0 additions & 53 deletions .github/workflows/check-lint.yaml.DISABLE

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/check-static.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check - static

on:
pull_request:
types:
- assigned
- opened
- synchronize
- reopened
paths:
- "deepgram/**.py"

jobs:
checkstatic:
name: Check static
# Only run this job if we're in the main repo, not a fork.
if: github.repository == 'deepgram/deepgram-python-sdk'
runs-on: ubuntu-latest
steps:

- name: Checkout code by commit
uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Ensure dependencies installed
shell: bash
run: |
make ensure-deps

- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r examples/requirements-examples.txt

- name: Run mdlint
run: |
make static
Loading
Loading