diff --git a/.github/workflows/check-file-size.yml b/.github/workflows/check-file-size.yml index f201f96..155fcf5 100644 --- a/.github/workflows/check-file-size.yml +++ b/.github/workflows/check-file-size.yml @@ -1,4 +1,5 @@ name: Check file size + on: # or directly `on: [push]` to run the action on every push on any branch pull_request: branches: [main] diff --git a/.github/workflows/node-js-tests.yml b/.github/workflows/node-js-tests.yml index 74dee6c..f307cd0 100644 --- a/.github/workflows/node-js-tests.yml +++ b/.github/workflows/node-js-tests.yml @@ -4,8 +4,8 @@ name: Node.js Tests on: - push: - branches: [ "main" ] + # push: + # branches: [ "main" ] pull_request: branches: [ "main" ] @@ -20,9 +20,9 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..5c23331 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,20 @@ +name: Test Build and Deploy + +on: + push: + branches: [main] + # to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Build Node.js app + uses: ./.github/workflows/node-js-tests.yml + - name: Build Python package + uses: ./.github/workflows/python-tests.yml + - name: Sync to Deployment Fork + uses: ./.github/workflows/sync-to-deployment-fork.yml + - name: Sync to Hugging Face Hub Spaces + uses: ./.github/workflows/sync-to-hugging-face-hub.yml \ No newline at end of file diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 9f5c359..dd00b43 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -4,8 +4,8 @@ name: Python Tests on: - push: - branches: [ "main" ] + # push: + # branches: [ "main" ] pull_request: branches: [ "main" ] @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install poetry run: pipx install poetry - name: Set up Python 3.11 @@ -31,8 +31,7 @@ jobs: run: | # python -m pip install --upgrade pip setuptools wheel # python -m pip install poetry - poetry install --without dev,torch-cuda - poetry add flake8 pytest + poetry install --without torch-cuda - name: Lint with flake8 working-directory: ./backend run: | diff --git a/.github/workflows/sync-to-deployment-fork.yml b/.github/workflows/sync-to-deployment-fork.yml index 36d4ff8..490b6e1 100644 --- a/.github/workflows/sync-to-deployment-fork.yml +++ b/.github/workflows/sync-to-deployment-fork.yml @@ -1,11 +1,11 @@ name: Sync to Deployment Fork on: - push: - branches: - - main + # push: + # branches: [main] # schedule: # - cron: '*/30 * * * *' # every 30 minutes - workflow_dispatch: # on button click + # to run this workflow manually from the Actions tab + workflow_dispatch: jobs: sync-deployment-fork: diff --git a/.github/workflows/sync-to-hugging-face-hub.yml b/.github/workflows/sync-to-hugging-face-hub.yml index 5027e6b..359c9fe 100644 --- a/.github/workflows/sync-to-hugging-face-hub.yml +++ b/.github/workflows/sync-to-hugging-face-hub.yml @@ -1,8 +1,7 @@ name: Sync to Hugging Face hub on: - push: - branches: [main] - + # push: + # branches: [main] # to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/README.md b/README.md index 8bcfa77..6fa5d0e 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,19 @@ pinned: false [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/digitalbuiltenvironment/Smart-Retrieval.svg)](https://github.com/digitalbuiltenvironment/Smart-Retrieval/pulls) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) +--- +

Pipeline Status:

+ +[![Test Build and Deploy](https://github.com/digitalbuiltenvironment/Smart-Retrieval/actions/workflows/pipeline.yml/badge.svg)](https://github.com/digitalbuiltenvironment/Smart-Retrieval/actions/workflows/pipeline.yml) + --- -

A Large Language Model (LLM) powered platform for information retrieval. -
+

+
+ A Large Language Model (LLM) powered platform for information retrieval. +

## 📝 Table of Contents @@ -52,12 +59,11 @@ Project files bootstrapped with [`create-llama`](https://github.com/run-llama/Ll These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system. -1) First, startup the backend as described in the [backend README](./backend/README.md). - -2) Second, run the development server of the frontend as described in the [frontend README](./frontend/README.md). +1. First, startup the backend as described in the [backend README](./backend/README.md). -3) Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +2. Second, run the development server of the frontend as described in the [frontend README](./frontend/README.md). +3. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. ## 🚀 Deployment diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 5f30940..912b1b6 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -19,6 +19,8 @@ docx2txt = "^0.8" # Dev Dependencies here [tool.poetry.group.dev.dependencies] +flake8 = "^7.0.0" +pytest = "^7.4.4" # For CPU torch version: Windows and Linux [tool.poetry.group.torch-cpu.dependencies]