chore: Remove OpenAI test coverage (#3033)
* chore: remove * refactor: update markdown --------- Co-authored-by: Van-QA <van@jan.ai>
This commit is contained in:
parent
f702506e58
commit
4775549212
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -4,9 +4,13 @@ labels: [ "type: bug" ]
|
||||
title: 'bug: [DESCRIPTION]'
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for taking the time to fill out this bug report!"
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Thanks for taking the time to fill out this bug report!"
|
||||
label: " "
|
||||
description: "Please search [here](./?q=is%3Aissue) to see if an issue already exists for the bug you encountered"
|
||||
options:
|
||||
- label: "I have searched the existing issues"
|
||||
@ -56,8 +60,8 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "Package version"
|
||||
description: "Which version of `Jan` are you using?"
|
||||
label: "Jan version"
|
||||
description: "**Tip:** The version is located in the lower right conner of the Jan app"
|
||||
placeholder: "e.g. 0.5.x-xxx nightly or stable"
|
||||
|
||||
- type: checkboxes
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
8
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@ -3,9 +3,13 @@ description: "Suggest an idea for this project \U0001F63B!"
|
||||
title: 'feat: [DESCRIPTION]'
|
||||
labels: 'type: feature request'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for taking the time to fill out this form!"
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Thanks for taking the time to fill out this form!"
|
||||
label: " "
|
||||
description: "Please search [here](./?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
|
||||
options:
|
||||
- label: "I have searched the existing issues"
|
||||
@ -24,7 +28,7 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "Describe the solution you'd like"
|
||||
label: "Describe the solution"
|
||||
description: "Description of what you want to happen. Add any considered drawbacks"
|
||||
|
||||
- type: textarea
|
||||
|
||||
101
.github/workflows/jan-openai-api-test.yml
vendored
101
.github/workflows/jan-openai-api-test.yml
vendored
@ -1,101 +0,0 @@
|
||||
name: Test - OpenAI API Pytest collection
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
endpoints:
|
||||
description: 'comma-separated list (see available at endpoints_mapping.json e.g. GET /users,POST /transform)'
|
||||
required: false
|
||||
default: all
|
||||
type: string
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- release/**
|
||||
paths:
|
||||
- "docs/**"
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- release/**
|
||||
paths:
|
||||
- "docs/**"
|
||||
|
||||
jobs:
|
||||
openai-python-tests:
|
||||
runs-on: [self-hosted, Linux, ubuntu-desktop]
|
||||
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- name: Getting the repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Installing node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: "Cleanup cache"
|
||||
continue-on-error: true
|
||||
run: |
|
||||
rm -rf ~/jan
|
||||
make clean
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install -g @stoplight/prism-cli
|
||||
|
||||
- name: Create python virtual environment and run test
|
||||
run: |
|
||||
python3 -m venv /tmp/jan
|
||||
source /tmp/jan/bin/activate
|
||||
# Clone openai-api-python repo
|
||||
OPENAI_API_PYTHON_TAG=$(cat docs/openapi/version.txt)
|
||||
git clone https://github.com/openai/openai-python.git
|
||||
cd openai-python
|
||||
git checkout $OPENAI_API_PYTHON_TAG
|
||||
|
||||
python3 -m venv /tmp/jan
|
||||
source /tmp/jan/bin/activate
|
||||
pip install -r requirements-dev.lock
|
||||
pip install pytest-reportportal pytest-html
|
||||
|
||||
# Create pytest.ini file with content
|
||||
cat ../docs/tests/pytest.ini >> pytest.ini
|
||||
echo "rp_api_key = ${{ secrets.REPORT_PORTAL_API_KEY }}" >> pytest.ini
|
||||
echo "rp_endpoint = ${{ secrets.REPORT_PORTAL_URL_PYTEST }}" >> pytest.ini
|
||||
cat pytest.ini
|
||||
|
||||
# Append to conftest.py
|
||||
cat ../docs/tests/conftest.py >> tests/conftest.py
|
||||
cat ../docs/tests/endpoints_mapping.json >> tests/endpoints_mapping.json
|
||||
|
||||
# start mock server and run test then stop mock server
|
||||
prism mock ../docs/openapi/jan.yaml > prism.log & prism_pid=$! &&
|
||||
pytest --endpoint "$ENDPOINTS" --reportportal --html=report.html && kill $prism_pid
|
||||
deactivate
|
||||
env:
|
||||
ENDPOINTS: ${{ github.event.inputs.endpoints }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: report
|
||||
path: |
|
||||
openai-python/report.html
|
||||
openai-python/assets
|
||||
openai-python/prism.log
|
||||
|
||||
- name: Clean up
|
||||
if: always()
|
||||
run: |
|
||||
rm -rf /tmp/jan
|
||||
rm -rf openai-python
|
||||
rm -rf report.html
|
||||
rm -rf report.zip
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user