Skip to content

Commit

Permalink
Add self test
Browse files Browse the repository at this point in the history
Add self test
  • Loading branch information
JE-Chen committed Feb 17, 2024
1 parent f76e9bf commit 3603610
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/re_edge_gpt_dev_python3_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r dev_requirements.txt
pip install -r ./test/dev_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/re_edge_gpt_dev_python3_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r dev_requirements.txt
pip install -r ./test/dev_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/re_edge_gpt_dev_python3_9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r dev_requirements.txt
pip install -r ./test/dev_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/re_edge_gpt_self_python3_10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ReEdgeGPT Dev Python3.9

on:
push:
branches: [ "dev", "main"]
schedule:
- cron: "0 8 * * *"
pull_request_target:
types: [assigned, opened, synchronize, reopened]

permissions:
contents: read

jobs:
build_dev_version:
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r ./test/self_test_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot.py
- name: Test Generation Image
env:
IMAGE_COOKIE: ${{ secrets.IMAGE_COOKIE }}
run: python ./test/unit_test/back-end/test_generate_image/test_generation.py
- name: Test chat with plugins
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_plugins_manual.py
- name: Test chat with file
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_file.py
43 changes: 43 additions & 0 deletions .github/workflows/re_edge_gpt_self_python3_11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ReEdgeGPT Dev Python3.9

on:
push:
branches: [ "dev", "main"]
schedule:
- cron: "0 8 * * *"
pull_request_target:
types: [assigned, opened, synchronize, reopened]

permissions:
contents: read

jobs:
build_dev_version:
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r ./test/self_test_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot.py
- name: Test Generation Image
env:
IMAGE_COOKIE: ${{ secrets.IMAGE_COOKIE }}
run: python ./test/unit_test/back-end/test_generate_image/test_generation.py
- name: Test chat with plugins
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_plugins_manual.py
- name: Test chat with file
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_file.py
43 changes: 43 additions & 0 deletions .github/workflows/re_edge_gpt_self_python3_9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ReEdgeGPT Dev Python3.9

on:
push:
branches: [ "dev", "main"]
schedule:
- cron: "0 8 * * *"
pull_request_target:
types: [assigned, opened, synchronize, reopened]

permissions:
contents: read

jobs:
build_dev_version:
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r ./test/self_test_requirements.txt
- name: Test Bot
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot.py
- name: Test Generation Image
env:
IMAGE_COOKIE: ${{ secrets.IMAGE_COOKIE }}
run: python ./test/unit_test/back-end/test_generate_image/test_generation.py
- name: Test chat with plugins
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_plugins_manual.py
- name: Test chat with file
env:
EDGE_COOKIES: ${{ secrets.EDGE_COOKIES }}
run: python ./test/unit_test/back-end/test_bot/test_bot_with_file.py
File renamed without changes.
18 changes: 18 additions & 0 deletions test/self_test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
aiohttp
certifi
httpx
prompt_toolkit
requests
rich
regex
# GUI
PySide6
qt-material
SpeechRecognition
# API
flask[async]
apispec
apispec-webframeworks
marshmallow
Flask-CORS
gunicorn

0 comments on commit 3603610

Please sign in to comment.