Update API mirror URL and fix test case
This commit is contained in:
parent
92a06bd5c2
commit
14a97da330
4 changed files with 10 additions and 5 deletions
4
.github/workflows/pr-test.yml
vendored
4
.github/workflows/pr-test.yml
vendored
|
|
@ -40,7 +40,7 @@ env:
|
|||
|
||||
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
TEST_MOAPI_SECRET: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
TEST_MOAPI_MIRROR: https://api.openai.com/v1
|
||||
TEST_MOAPI_MIRROR: https://api.openai.com
|
||||
|
||||
TAB_NAME: "::PET ADMIN"
|
||||
PAGE_SIZE: "20"
|
||||
|
|
@ -167,7 +167,7 @@ jobs:
|
|||
with:
|
||||
repository: yaoapp/page-builder-app
|
||||
token: ${{ secrets.YAO_TEST_TOKEN }}
|
||||
path: page-builder-app
|
||||
path: page-builder-app
|
||||
|
||||
- name: Checkout Extension
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
|||
4
.github/workflows/unit-test.yml
vendored
4
.github/workflows/unit-test.yml
vendored
|
|
@ -44,7 +44,7 @@ env:
|
|||
|
||||
OPENAI_TEST_KEY: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
TEST_MOAPI_SECRET: ${{ secrets.OPENAI_TEST_KEY }}
|
||||
TEST_MOAPI_MIRROR: https://api.openai.com/v1
|
||||
TEST_MOAPI_MIRROR: https://api.openai.com
|
||||
|
||||
TAB_NAME: "::PET ADMIN"
|
||||
PAGE_SIZE: "20"
|
||||
|
|
@ -59,7 +59,7 @@ env:
|
|||
YAO_TEST_APPLICATION: ${{ github.WORKSPACE }}/../app
|
||||
YAO_EXTENSION_ROOT: ${{ github.WORKSPACE }}/../extension
|
||||
YAO_TEST_BUILDER_APPLICATION: ${{ github.WORKSPACE }}/../page-builder-app
|
||||
|
||||
|
||||
## Runtime
|
||||
YAO_RUNTIME_MIN: 3
|
||||
YAO_RUNTIME_MAX: 6
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package pipe
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -51,6 +52,7 @@ func TestRun(t *testing.T) {
|
|||
func prepare(t *testing.T) {
|
||||
test.Prepare(t, config.Conf)
|
||||
mirror := os.Getenv("TEST_MOAPI_MIRROR")
|
||||
fmt.Println(mirror)
|
||||
secret := os.Getenv("TEST_MOAPI_SECRET")
|
||||
share.App = share.AppInfo{
|
||||
Moapi: share.Moapi{Channel: "stable", Mirrors: []string{mirror}, Secret: secret},
|
||||
|
|
|
|||
|
|
@ -8,8 +8,11 @@ import (
|
|||
// **Warning** This process under developing, do not use it
|
||||
func ProcessValidate(process *process.Process) interface{} {
|
||||
process.ValidateArgNums(2)
|
||||
data := process.ArgsMap(0, map[string]interface{}{}).Dot()
|
||||
if _, ok := process.Args[0].(map[string]interface{}); !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
data := process.ArgsMap(0, map[string]interface{}{}).Dot()
|
||||
rules := process.ArgsRecords(1)
|
||||
for _, rule := range rules {
|
||||
for method, value := range rule {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue