Skip to content

Commit

Permalink
chore(frontend): Add CI to check client is properly generated for cor…
Browse files Browse the repository at this point in the history
…al/assistants (#869)

* wip

* use make

* use npm directly

* Update client
  • Loading branch information
tianjing-li authored Dec 6, 2024
1 parent c039eca commit a5892ca
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/frontend_assistants_web_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Assistants Web - Format and build
name: Assistants Web - Format, Build & Validate

on:
push:
Expand All @@ -18,9 +18,15 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Start backend (for OpenAPI)
run: docker compose up backend -d
- name: Set up Node.js and install dependencies
uses: ./.github/actions/assistants-web-install
- name: Check assistants_web is formatted
- name: Check format
run: npm run format
- name: Check assistants_web can build
- name: Check build
run: npm run build
- name: Generate client
run: npm run generate:client && npm run format:write
- name: Check generated client
run: git diff --exit-code ./src/cohere-client/generated || (echo "Generated client is outdated. Please regenerate and commit." && exit 1)
6 changes: 3 additions & 3 deletions .github/workflows/frontend_coral_web_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Coral Web - Format and build
name: Coral Web - Format, Build & Validate

on:
push:
Expand All @@ -20,7 +20,7 @@ jobs:
fetch-depth: 2
- name: Set up Node.js and install dependencies
uses: ./.github/actions/coral-web-install
- name: Check coral_web is formatted
- name: Check format
run: npm run format
- name: Check coral_web can build
- name: Check build
run: npm run build
10 changes: 5 additions & 5 deletions .github/workflows/frontend_slack_bot_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Slack Bot - Format and build
name: Slack Bot - Format, Build & Validate

on:
push:
Expand Down Expand Up @@ -28,11 +28,11 @@ jobs:
shell: bash
working-directory: src/interfaces/slack_bot
run: npm ci
- name: Check slack_bot is formatted
- name: Check format
run: npm run format
- name: Check slack_bot types
- name: Check types
run: npm run tsc:check
- name: Run slack_bot tests
- name: Run tests
run: npm run test
- name: Check slack_bot can build
- name: Check build
run: npm run build
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ export const $AgentPublic = {
type: 'string',
title: 'User Id',
},
organization_id: {
anyOf: [
{
type: 'string',
},
{
type: 'null',
},
],
title: 'Organization Id',
},
id: {
type: 'string',
title: 'Id',
Expand Down Expand Up @@ -3116,6 +3105,11 @@ export const $ToolDefinition = {
title: 'Token',
default: '',
},
should_return_token: {
type: 'boolean',
title: 'Should Return Token',
default: false,
},
},
type: 'object',
title: 'ToolDefinition',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

export type AgentPublic = {
user_id: string;
organization_id?: string | null;
id: string;
created_at: string;
updated_at: string;
Expand Down Expand Up @@ -664,6 +663,7 @@ export type ToolDefinition = {
is_auth_required?: boolean;
auth_url?: string | null;
token?: string | null;
should_return_token?: boolean;
};

/**
Expand Down

0 comments on commit a5892ca

Please sign in to comment.