Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changelog": "@changesets/changelog-github",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
18 changes: 18 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Global owners
* @no-witness-labs

# Evolution SDK core
/packages/evolution/ @no-witness-labs

# Documentation
/docs/ @no-witness-labs
/README.md @no-witness-labs

# CI/CD and GitHub configuration
/.github/ @no-witness-labs
/.changeset/ @no-witness-labs

# Package configuration
/package.json @no-witness-labs
/turbo.json @no-witness-labs
/tsconfig*.json @no-witness-labs
119 changes: 119 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🔬 Lint
run: pnpm turbo run lint --affected

typecheck:
name: ʦ TypeScript
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🔎 Type check
run: pnpm turbo run type-check --affected

test:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🧪 Run tests
run: pnpm turbo run test --affected

build:
name: 🏗 Build
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🏗 Build packages
run: pnpm turbo run build --affected

- name: 📄 Generate docs (validate examples)
run: pnpm turbo run docgen --affected || echo "No docgen script found, skipping"

# All jobs must pass
ci:
name: ✅ CI
runs-on: ubuntu-latest
if: always()
needs: [lint, typecheck, test, build]
steps:
- name: ✅ All jobs passed
if: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
run: exit 0

- name: ❌ Some jobs failed
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
104 changes: 104 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Deploy Documentation

on:
push:
branches: [main]
paths:
- 'docs/**'
- 'packages/evolution/src/**'
- 'packages/evolution/docs/**'
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.changes.outputs.should_build }}
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for turbo-ignore

- name: 🔍 Check for documentation changes
id: changes
run: |
npx turbo-ignore docs
echo "should_build=$?" >> $GITHUB_OUTPUT
continue-on-error: true

- name: 📦 Install pnpm
if: steps.changes.outputs.should_build == '1'
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
if: steps.changes.outputs.should_build == '1'
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 🔧 Setup Pages
if: steps.changes.outputs.should_build == '1'
uses: actions/configure-pages@v4
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next

- name: 📦 Install dependencies
if: steps.changes.outputs.should_build == '1'
run: pnpm install --frozen-lockfile

- name: 🏗 Build packages (required for docs)
if: steps.changes.outputs.should_build == '1'
run: pnpm turbo run build

- name: 📄 Generate Evolution SDK docs
if: steps.changes.outputs.should_build == '1'
run: pnpm turbo run docgen
working-directory: packages/evolution

- name: 📚 Copy Evolution docs to website
if: steps.changes.outputs.should_build == '1'
run: node scripts/copy-evolution-docs.mjs
working-directory: docs

- name: 🏗 Build documentation with Next.js
if: steps.changes.outputs.should_build == '1'
run: pnpm turbo run build
working-directory: docs

- name: 📤 Upload artifact
if: steps.changes.outputs.should_build == '1'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.should_build == '1' || github.event_name == 'workflow_dispatch'
steps:
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: 🚀 Release
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org/'

- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- name: 🏗 Build packages
run: pnpm turbo run build

- name: 🧪 Run tests
run: pnpm turbo run test

- name: 📄 Generate docs
run: pnpm turbo run docgen || echo "No docgen script found, skipping"

- name: 🦋 Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This uses our custom publish script that builds before publishing
publish: pnpm changeset-publish
title: "ci(changesets): version packages"
commit: "ci(changesets): version packages"
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 📢 Send a Slack notification if a publish happened
if: steps.changesets.outputs.published == 'true'
# You can do something when a publish happens.
run: echo "A new version of Evolution SDK was published!"
64 changes: 64 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update Dependencies

on:
schedule:
# Run every Monday at 9:00 AM UTC
- cron: '0 9 * * 1'
workflow_dispatch:

jobs:
update-dependencies:
name: 🔄 Update Dependencies
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install

- name: 🔄 Update dependencies
run: |
pnpm update --latest --recursive
pnpm install

- name: 🧪 Run tests
run: pnpm turbo run test
continue-on-error: true

- name: 🏗 Build packages
run: pnpm turbo run build
continue-on-error: true

- name: 📝 Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update dependencies'
title: 'chore: update dependencies'
body: |
This PR updates all dependencies to their latest versions.

## Changes
- Updated all dependencies to latest versions

## Testing
- [ ] CI tests pass
- [ ] Manual testing required

## Notes
Please review the changes carefully and test thoroughly before merging.
branch: chore/update-dependencies
delete-branch: true
base: main
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
temp/
.turbo
node_modules
dist
*.log
.DS_Store
.direnv
docs/out
docs/.next
Loading