Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Nov 27, 2024
2 parents c8082e6 + df28709 commit f626c26
Show file tree
Hide file tree
Showing 28 changed files with 131 additions and 7,422 deletions.
11 changes: 10 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "./src/adapters/supabase/**/**.ts", "./src/types/database.ts", "./supabase/config.toml"],
"ignorePaths": [
"**/*.json",
"**/*.css",
"node_modules",
"**/*.log",
"./src/adapters/supabase/**/**.ts",
"./src/types/database.ts",
"./supabase/config.toml",
"dist/**"
],
"useGitignore": true,
"language": "en",
"words": [
Expand Down
2 changes: 1 addition & 1 deletion .github/knip.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { KnipConfig } from "knip";

const config: KnipConfig = {
entry: ["build/index.ts"],
entry: ["src/main.ts"],
project: ["src/**/*.ts"],
ignore: ["src/types/config.ts", "**/__mocks__/**", "**/__fixtures__/**", "src/types/database.ts"],
ignoreExportsUsedInFile: true,
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "@ubiquity-os/comment-vector-embeddings"
name: "Plugin Compute"

on:
workflow_dispatch:
Expand All @@ -25,10 +25,7 @@ jobs:
name: "Comment Embedding Store"
runs-on: ubuntu-latest
permissions: write-all
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
VOYAGEAI_API_KEY: ${{secrets.VOYAGEAI_API_KEY}}
environment: ${{ github.ref == 'refs/heads/main' && 'main' || 'development' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -38,13 +35,11 @@ jobs:
with:
node-version: "20.10.0"

- name: install dependencies
run: yarn

- name: execute directive
run: npx tsx ./src/main.ts
id: issue-comment-embeddings
- name: Execute plugin
run: node dist/index.js
env:
PLUGIN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
VOYAGEAI_API_KEY: ${{secrets.VOYAGEAI_API_KEY}}
VOYAGEAI_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}
KERNEL_PUBLIC_KEY: ${{ secrets.KERNEL_PUBLIC_KEY }}
24 changes: 0 additions & 24 deletions .github/workflows/cspell.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ jobs:
with:
node-version: "20.10.0"

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Generate Supabase Types
run: |
yarn install
yarn run "supabase:generate:remote"
bun install --frozen-lockfile
bun run "supabase:generate:remote"
- name: Commit and Push generated types
run: |
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Update Configuration and Build"

on:
workflow_dispatch:
push:

jobs:
update:
name: "Update Configuration & Build"
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: ubiquity-os/action-deploy-plugin@main
with:
treatAsEsm: true
sourcemap: false
pluginEntry: "src/main.ts"
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Formatting Check

on:
push:

jobs:
format-check:
name: Check for formatting errors
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Eslint
run: bun run eslint --fix-dry-run

- name: Cspell
run: bun run format:cspell

- name: Prettier
run: bun run prettier --check .
8 changes: 7 additions & 1 deletion .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Jest With Coverage
run: yarn install --immutable --immutable-cache --check-cache && yarn test
run: bun run test

- name: Add Jest Report to Summary
if: always()
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
with:
node-version: 20.10.0

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: yarn install
run: bun install --frozen-lockfile

- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt

- name: Run Knip
run: yarn knip || yarn knip --reporter json > knip-results.json
run: bun run knip || bun run knip --reporter json > knip-results.json

- name: Upload knip result
if: failure()
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/update-configuration.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/worker-delete.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/worker-deploy.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
Loading

0 comments on commit f626c26

Please sign in to comment.