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

Adds the PAT_GITHUB to the checkout code as well. #9

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2f5d6da
Basic test suite implementation
darielnoel Jul 16, 2024
bd4f9ae
Adding basic test suite and ci github actions.
darielnoel Jul 16, 2024
b602796
chore: Update npm install command to include dev dependencies
darielnoel Jul 16, 2024
533af34
Adds npx to rollup
darielnoel Jul 16, 2024
456cd17
chore: Update Node.js version to 18 in test workflow
darielnoel Jul 16, 2024
18f53b1
Added separated workflows for main stability and for pr checks.
darielnoel Jul 16, 2024
6c8c2e1
Merge pull request #2 from AI-Champions/basic-test-suite
darielnoel Jul 16, 2024
0eef70c
Merge branch 'main' of https://github.com/AI-Champions/AgenticJS
darielnoel Jul 16, 2024
b188c1a
Merge pull request #3 from AI-Champions/tetsing-prs
darielnoel Jul 16, 2024
1833e3a
ci for releasing.
darielnoel Jul 16, 2024
7c092dc
Merge pull request #4 from AI-Champions/ci-for-releasing
darielnoel Jul 16, 2024
f0f4f41
chore: Update npm install command to include dev dependencies
darielnoel Jul 16, 2024
6158008
Merge branch 'main' into ci-for-releasing
darielnoel Jul 16, 2024
60192f0
Merge pull request #5 from AI-Champions/ci-for-releasing
darielnoel Jul 16, 2024
1b905c8
Adds forced git fetch to have a clean branch before releasing a version
darielnoel Jul 16, 2024
c931718
Merge branch 'ci-for-releasing' of https://github.com/AI-Champions/Ag…
darielnoel Jul 16, 2024
4bd7b15
Merge branch 'main' into ci-for-releasing
darielnoel Jul 16, 2024
ded4bab
Merge pull request #6 from AI-Champions/ci-for-releasing
darielnoel Jul 16, 2024
097830a
Fixing all dependencies and re-building package.lock
darielnoel Jul 16, 2024
86b8faa
Merge branch 'ci-for-releasing' of https://github.com/AI-Champions/Ag…
darielnoel Jul 16, 2024
ccfe16e
Merge branch 'main' into ci-for-releasing
darielnoel Jul 16, 2024
02d010a
Add PAT Github
darielnoel Jul 16, 2024
899ce77
Merge branch 'ci-for-releasing' of https://github.com/AI-Champions/Ag…
darielnoel Jul 16, 2024
d5b9625
Adds the PAT_GITHUB to the checkout code as well.
darielnoel Jul 16, 2024
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
37 changes: 37 additions & 0 deletions .github/workflows/pr-validation-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Validation CI

on:
pull_request:
branches: [main] # Triggered on PRs targeting these branches

jobs:
build-and-test:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: npm install --also=dev

- name: Build for integration tests
run: npm run build:test

- name: Run integration tests
run: npm run test:integration

- name: Build production version
run: npm run build

- name: Run e2e tests
run: npm run test:e2e
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release Version

on:
workflow_dispatch:
inputs:
version:
description: 'Enter the version for this release'
required: true

jobs:
release:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: 'main' # Ensures the main branch is checked out
token: ${{ secrets.PAT_GITHUB }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'

- name: Reset local changes
run: |
git fetch origin main
git reset --hard origin/main
git clean -fdx

- name: Configure git user
run: |
git config user.name "Dariel Noel"
git config user.email "[email protected]"

- name: Install dependencies
run: npm install --also=dev

- name: Build production version
run: npm run build

- name: Display changes
run: |
echo "Showing status..."
git status
echo "Showing diff..."
git diff

- name: Update package.json version and create Git tag
run: npm version ${{ github.event.inputs.version }}

- name: Push changes and tags
run: |
git push origin main --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/stable-main-check-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Stable Main CI

on:
push:
branches: [main] # Triggered on commits pushed to these branches

jobs:
build-and-test:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: npm install --also=dev

- name: Build for integration tests
run: npm run build:test

- name: Run integration tests
run: npm run test:integration

- name: Build production version
run: npm run build

- name: Run e2e tests
run: npm run test:e2e
13 changes: 13 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
transform: {
'^.+\\.js$': 'babel-jest',
},
moduleNameMapper: {
'^agenticjs$': '<rootDir>/dist/bundle.cjs.js'
},
testTimeout: 300000, // Sets global timeout to 10 seconds for all tests
testEnvironment: 'node', // Use Node.js environment for executing tests,
verbose: true, // Make Jest more verbose
silent: false, // Ensure Jest is not silent (though this is not directly related to console.log output)

};
Loading
Loading