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

Add linting #16

Merged
merged 6 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
21 changes: 16 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nillion SDK
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to install the Nillion SDK for linting? Isn't it enough with having poetry install nada_dsl and py_nillion_client?

run: |
echo "$HOME/.nilup/bin/" >> $GITHUB_PATH
curl https://nilup.nilogy.xyz/install.sh | bash
- name: Setup Nillion SDK
run: |
nilup init
nilup install latest
nilup use latest
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black[jupyter]
- name: Check linting
run: black --check .
# If PR fails in this stage, it's because of linting issues: run `black .` to fix them
pip install poetry
poetry install --with dev
- name: Run pylint
run: poetry run pylint nada_ai
- name: Run mypy
run: poetry run mypy nada_ai

build:
needs: check-linting
Expand Down Expand Up @@ -55,4 +66,4 @@ jobs:
pip install poetry
poetry install --with dev
- name: Run tests
run: poetry run pytest
run: poetry run pytest -vv
Loading
Loading