Skip to content

Commit 28161b3

Browse files
authored
Merge branch 'main' into base-ragsearch-plugin
2 parents 0e778aa + 81d0273 commit 28161b3

File tree

664 files changed

+79373
-49924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

664 files changed

+79373
-49924
lines changed

.env.example

+195-84
Large diffs are not rendered by default.

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cache: "pnpm"
2121

2222
- name: Install dependencies
23-
run: pnpm install --no-frozen-lockfile
23+
run: pnpm install
2424

2525
- name: Run Prettier
2626
run: pnpm run prettier --check .
@@ -34,7 +34,7 @@ jobs:
3434
echo "NODE_ENV=test" >> packages/core/.env.test
3535
3636
- name: Run tests
37-
run: cd packages/core && pnpm test
37+
run: cd packages/core && pnpm test:coverage
3838

3939
- name: Build packages
4040
run: pnpm run build

.github/workflows/image.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
name: Create and publish a Docker image
3+
4+
# Configures this workflow to run every time a change is pushed to the branch called `release`.
5+
on:
6+
release:
7+
types: [created]
8+
workflow_dispatch:
9+
10+
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
16+
jobs:
17+
build-and-push-image:
18+
runs-on: ubuntu-latest
19+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
20+
permissions:
21+
contents: read
22+
packages: write
23+
attestations: write
24+
id-token: write
25+
#
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
30+
- name: Log in to the Container registry
31+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
37+
- name: Extract metadata (tags, labels) for Docker
38+
id: meta
39+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42+
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
43+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
44+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
45+
- name: Build and push Docker image
46+
id: push
47+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
48+
with:
49+
context: .
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
54+
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
55+
- name: Generate artifact attestation
56+
uses: actions/attest-build-provenance@v1
57+
with:
58+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
59+
subject-digest: ${{ steps.push.outputs.digest }}
60+
push-to-registry: true
61+
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: integration-test
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request_target:
7+
branches:
8+
- "*"
9+
jobs:
10+
smoke-tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: pnpm/action-setup@v3
16+
with:
17+
version: 9.4.0
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: "23"
22+
cache: "pnpm"
23+
24+
- name: Run smoke tests
25+
run: pnpm run smokeTests
26+
integration-tests:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: pnpm/action-setup@v3
32+
with:
33+
version: 9.4.0
34+
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: "23"
38+
cache: "pnpm"
39+
40+
- name: Install dependencies
41+
run: pnpm install -r
42+
43+
- name: Build packages
44+
run: pnpm build
45+
46+
- name: Run integration tests
47+
env:
48+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
49+
run: |
50+
if [ -z "$OPENAI_API_KEY" ]; then
51+
echo "Skipping integration tests due to missing required API keys"
52+
exit 1
53+
else
54+
pnpm run integrationTests
55+
fi

.github/workflows/require-develop.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check pull request source branch
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- edited
9+
jobs:
10+
check-branches:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check branches
14+
run: |
15+
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
16+
echo "Merge requests to main branch are only allowed from dev branch."
17+
exit 1
18+
fi

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ node_modules
33

44
.env
55
.env.production
6+
.env.local
7+
.env_main
68
concatenated-output.ts
79
embedding-cache.json
810
packages/plugin-buttplug/intiface-engine
@@ -47,3 +49,6 @@ packages/plugin-coinbase/package-lock.json
4749
tsup.config.bundled_*.mjs
4850

4951
.turbo
52+
53+
coverage
54+
.eslintcache

.gitpod.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ tasks:
44
init: |
55
nvm install v23.3.0
66
git checkout $(git describe --tags --abbrev=0)
7-
command: pnpm install && pnpm run build
8-
7+
command: pnpm install && pnpm run build

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node-linker=hoisted
2+
frozen-lockfile=true

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
"[shellscript]": {
4545
"editor.defaultFormatter": "foxundermoon.shell-format"
4646
}
47-
}
47+
}

0 commit comments

Comments
 (0)