Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(frontend): Add CI to check client is properly generated for coral/assistants #869

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading