Skip to content

Commit

Permalink
Linting and formatting check in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob committed Oct 31, 2024
1 parent 4d2c7c4 commit 5089d13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
pytest:
uses: ./.github/workflows/pytest.yaml
secrets: inherit
mypy:
uses: ./.github/workflows/mypy.yaml
lint-backend:
uses: ./.github/workflows/lint-backend.yaml
secrets: inherit
e2e-tests:
uses: ./.github/workflows/e2e-tests.yaml
Expand All @@ -26,7 +26,7 @@ jobs:
ci:
runs-on: ubuntu-latest
name: Run CI
needs: [mypy, pytest, lint-ui, e2e-tests]
needs: [lint-backend, pytest, lint-ui, e2e-tests]
steps:
- name: Done
run: echo "Done"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Mypy
name: LintBackend

on: [workflow_call]

permissions: read-all

jobs:
mypy:
lint-backend:
runs-on: ubuntu-latest
env:
BACKEND_DIR: ./backend
Expand All @@ -16,6 +16,17 @@ jobs:
with:
poetry-install-args: --with tests --with mypy --with custom-data --no-root
poetry-working-directory: ${{ env.BACKEND_DIR }}
- name: Lint with ruff
uses: astral-sh/ruff-action@v1
with:
src: ${{ env.BACKEND_DIR }}
changed-files: "true"
- name: Check formatting with ruff
uses: astral-sh/ruff-action@v1
with:
src: ${{ env.BACKEND_DIR }}
changed-files: "true"
args: "format --check"
- name: Run Mypy
run: poetry run mypy chainlit/
working-directory: ${{ env.BACKEND_DIR }}

0 comments on commit 5089d13

Please sign in to comment.