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

Ci for environment testing #11

Merged
merged 2 commits into from
Jul 25, 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
77 changes: 77 additions & 0 deletions .github/workflows/environment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI with npm pack

on:
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout AgenticJS Library
uses: actions/checkout@v2
with:
repository: AI-Champions/AgenticJS
path: agenticjs

- name: Checkout AgenticJS-React-Vite Repository
uses: actions/checkout@v2
with:
repository: darielnoel/AgenticJS-React-Vite
token: ${{ secrets.GITHUB_TOKEN }} # This is needed to access the repository
path: react-vite-app

- name: Checkout AgenticJS-NodeJS Repository
uses: actions/checkout@v2
with:
repository: darielnoel/AgenticJS-NodeJS
token: ${{ secrets.GITHUB_TOKEN }} # This is needed to access the repository
path: agenticjs-nodejs

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x

- name: Build and Pack AgenticJS Library
run: |
cd agenticjs
npm install
npm run build
npm pack
id: agenticjs-build

- name: Install other dependencies for React + Vite App
run: |
cd react-vite-app
npm install

- name: Install AgenticJS in React + Vite App using Pack
run: |
cd react-vite-app
npm install ../agenticjs/*.tgz

- name: Build React + Vite App
run: |
cd react-vite-app
npm run build

# - name: Run tests for React + Vite App
# run: |
# cd react-vite-app
# npm test

# Handle NodeJS App after React + Vite App
- name: Install other dependencies for NodeJS App
run: |
cd agenticjs-nodejs
npm install

- name: Install AgenticJS in NodeJS App using Pack
run: |
cd agenticjs-nodejs
npm install ../agenticjs/*.tgz

- name: Test NodeJS App
run: |
cd agenticjs-nodejs
npm test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/bundle.cjs.js",
"module": "dist/bundle.esm.js",
"unpkg": "dist/bundle.umd.js",
"types": "types/index.d.ts",
"scripts": {
"build": "npx rollup -c",
"build:test": "TEST_ENV=mocked-llm-apis npx rollup -c",
Expand Down
45 changes: 45 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// -------------------------------------------------------------------------
// Welcome to the sketchbook of our library's type definitions.
//--------------------------------------------------------------------------
//
// Like a promise of "we'll do it tomorrow," we've sketched out the outlines but the details?
// Well, they will be defined later... This finger never eats but always says 'I'll pick the tab next time!'
//
// Feel adventurous? Help us fill in the gaps – don't wait for tomorrow!
// -------------------------------------------------------------------------

export class Agent {

[key: string]: any;

constructor(props?: Record<string, any>) {
Object.assign(this, props);
}

// Implementation details will be defined later...
// Yes, this is the 'I’ll clean my desk next week' kind of later.
}

export class Task {

[key: string]: any;

constructor(props?: Record<string, any>) {
Object.assign(this, props);
}

// Implementation details will be defined later...
// Like that gym membership we all get in January.
}

export class Team {

[key: string]: any;

constructor(props?: Record<string, any>) {
Object.assign(this, props);
}

// Implementation details will be defined later...
// We're scheduling a meeting to plan the meeting about this.
}
Loading