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

chore: Consolidate CI style checks #1936

Merged
merged 2 commits into from
Oct 24, 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
34 changes: 0 additions & 34 deletions .github/workflows/autoflake_format.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/black_format.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/code_style_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Code Style Checks

on:
pull_request:
paths:
- '**.py'
pull_request_target:
types:
- opened
- edited
- synchronize
workflow_dispatch:

permissions:
pull-requests: read

jobs:
validation-checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"] # Adjust Python version matrix if needed

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # Checkout the PR branch
fetch-depth: 0 # Fetch all history for all branches and tags

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: ${{ matrix.python-version }}
poetry-version: "1.8.2"
install-args: "-E dev -E postgres -E milvus -E external-tools -E tests" # Adjust as necessary

- name: Validate PR Title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Pyright
uses: jakebailey/pyright-action@v2
with:
python-version: ${{ matrix.python-version }}
level: "error"
continue-on-error: true

- name: Run isort
run: poetry run isort --profile black --check-only --diff .

- name: Run Black
run: poetry run black --check .

- name: Run Autoflake
run: poetry run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .
48 changes: 0 additions & 48 deletions .github/workflows/isort_format.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/pyright_types.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/semantic-prs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_letta_run_create_new_agent(swap_letta_config):
except (pexpect.TIMEOUT, pexpect.EOF):
print("[WARNING] Embedding model selection step was skipped.")

child.expect("Created new agent", timeout=10)
child.expect("Created new agent", timeout=20)
mattzh72 marked this conversation as resolved.
Show resolved Hide resolved
child.sendline("")

# Get initial response
Expand Down
Loading