mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-22 06:53:57 +00:00
update CI and test
This commit is contained in:
parent
561c0b01d2
commit
dbba7c31ac
2 changed files with 30 additions and 10 deletions
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
|
|
@ -18,18 +18,38 @@ jobs:
|
|||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
web_changed: ${{ steps.set_outputs.outputs.web_changed }}
|
||||
extension_changed: ${{ steps.set_outputs.outputs.extension_changed }}
|
||||
cf_ai_backend_changed: ${{ steps.set_outputs.outputs.cf_ai_backend_changed }}
|
||||
web_changed: ${{ steps.detect_changes.outputs.web_changed }}
|
||||
extension_changed: ${{ steps.detect_changes.outputs.extension_changed }}
|
||||
cf_ai_backend_changed: ${{ steps.detect_changes.outputs.cf_ai_backend_changed }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set Outputs
|
||||
id: set_outputs
|
||||
- name: Fetching all history for all tags and branches
|
||||
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
||||
- name: Detect Changes
|
||||
id: detect_changes
|
||||
run: |
|
||||
echo "web_changed=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q 'apps/web/' && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
|
||||
echo "extension_changed=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q 'apps/extension/' && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
|
||||
echo "cf_ai_backend_changed=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q 'apps/cf-ai-backend/' && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
|
||||
|
||||
WEB_CHANGED="false"
|
||||
EXTENSION_CHANGED="false"
|
||||
CF_AI_BACKEND_CHANGED="false"
|
||||
if [ "${{ github.event_name }}" = "push" ]; then
|
||||
DIFF_REF="${{ github.event.before }} ${{ github.sha }}"
|
||||
else
|
||||
DIFF_REF="${{ github.base_ref }}...${{ github.head_ref }}"
|
||||
fi
|
||||
if git diff --name-only $DIFF_REF | grep -q 'apps/web/'; then
|
||||
WEB_CHANGED="true"
|
||||
fi
|
||||
if git diff --name-only $DIFF_REF | grep -q 'apps/extension/'; then
|
||||
EXTENSION_CHANGED="true"
|
||||
fi
|
||||
if git diff --name-only $DIFF_REF | grep -q 'apps/cf-ai-backend/'; then
|
||||
CF_AI_BACKEND_CHANGED="true"
|
||||
fi
|
||||
echo "web_changed=$WEB_CHANGED" >> $GITHUB_OUTPUT
|
||||
echo "extension_changed=$EXTENSION_CHANGED" >> $GITHUB_OUTPUT
|
||||
echo "cf_ai_backend_changed=$CF_AI_BACKEND_CHANGED" >> $GITHUB_OUTPUT
|
||||
echo "Differences detected: WEB=$WEB_CHANGED, EXTENSION=$EXTENSION_CHANGED, CF_AI_BACKEND=$CF_AI_BACKEND_CHANGED"
|
||||
|
||||
build-extension:
|
||||
needs: prepare
|
||||
if: needs.prepare.outputs.extension_changed == 'true'
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ index_name = "anycontext-idx"
|
|||
[[d1_databases]]
|
||||
binding = "DATABASE"
|
||||
database_name = "dev-d1-anycontext"
|
||||
database_id = "fc562605-157a-4f60-b439-2a24ffed5b4c"
|
||||
database_id = "fc562605-157a-4f60-b439-2a24ffed5b4c"
|
||||
Loading…
Add table
Add a link
Reference in a new issue