-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed GH actions (added npm ci on root directory first)
- Loading branch information
Showing
6 changed files
with
187 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Lint | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
lint-agentkit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
cache: "npm" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install and lint in working directory | ||
- name: Install and lint agentkit | ||
working-directory: ./cdp-agentkit-core | ||
run: | | ||
npm ci | ||
npm run lint | ||
npm run format | ||
lint-langchain: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
cache: "npm" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install and lint in working directory | ||
- name: Install and lint langchain | ||
working-directory: ./cdp-langchain | ||
run: | | ||
npm ci | ||
npm run lint | ||
npm run format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Release AgentKit Core to NPM | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-agentkit: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
registry-url: "https://registry.npmjs.org" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install, build and publish in working directory | ||
- name: Install, build and publish agentkit | ||
working-directory: ./cdp-agentkit-core | ||
run: | | ||
npm ci | ||
npm run build | ||
npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Publish Docs to Github Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
cache: "npm" | ||
|
||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
|
||
# Build cdp-agentkit-core docs | ||
- name: Build AgentKit Core docs | ||
run: | | ||
cd cdp-agentkit-core | ||
npm ci | ||
npm run docs | ||
cd .. | ||
mkdir -p docs/cdp-agentkit-core | ||
cp -r cdp-agentkit-core/docs/* docs/cdp-agentkit-core/ | ||
# Build cdp-langchain docs | ||
- name: Build LangChain docs | ||
run: | | ||
cd cdp-langchain | ||
npm ci | ||
npm run docs | ||
cd .. | ||
mkdir -p docs/cdp-langchain | ||
cp -r cdp-langchain/docs/* docs/cdp-langchain/ | ||
# Deploy to GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
keep_files: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish LangChain to NPM | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-langchain: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
registry-url: "https://registry.npmjs.org" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install, build and publish in working directory | ||
- name: Install, build and publish langchain | ||
working-directory: ./cdp-langchain | ||
run: | | ||
npm ci | ||
npm run build | ||
npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Unit Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test-agentkit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ["18", "20"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install and test in working directory | ||
- name: Install and test agentkit | ||
working-directory: ./cdp-agentkit-core | ||
run: | | ||
npm ci | ||
npm run test:unit | ||
test-langchain: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ["18", "20"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
# Install dependencies in parent directory first | ||
- run: npm ci | ||
# Then install and test in working directory | ||
- name: Install and test langchain | ||
working-directory: ./cdp-langchain | ||
run: | | ||
npm ci | ||
npm run test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters