From 0b640ddab901070215e52733040e679c51ac7448 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Fri, 15 Nov 2024 18:00:05 +0800 Subject: [PATCH] chore: fix commands --- .../charts/graphql/templates/copilot-test.yaml | 17 +++++++++++++++++ packages/backend/server/package.json | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/helm/affine/charts/graphql/templates/copilot-test.yaml b/.github/helm/affine/charts/graphql/templates/copilot-test.yaml index 287ca7bc72dab..515ccd8918ddb 100644 --- a/.github/helm/affine/charts/graphql/templates/copilot-test.yaml +++ b/.github/helm/affine/charts/graphql/templates/copilot-test.yaml @@ -1,3 +1,4 @@ +{{ if .Values.app.copilot.enabled }} apiVersion: batch/v1 kind: CronJob metadata: @@ -27,9 +28,25 @@ spec: secretKeyRef: name: pg-postgresql key: postgres-password + - name: COPILOT_OPENAI_API_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.app.copilot.secretName }}" + key: openaiSecret + - name: COPILOT_FAL_API_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.app.copilot.secretName }}" + key: falSecret + - name: COPILOT_UNSPLASH_API_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.app.copilot.secretName }}" + key: unsplashSecret resources: requests: cpu: '100m' memory: '200Mi' restartPolicy: Never backoffLimit: 1 +{{ end }} diff --git a/packages/backend/server/package.json b/packages/backend/server/package.json index 92c59765bc503..64e77bac10a2c 100644 --- a/packages/backend/server/package.json +++ b/packages/backend/server/package.json @@ -12,10 +12,10 @@ "start": "node --loader ts-node/esm/transpile-only.mjs ./src/index.ts", "dev": "nodemon ./src/index.ts", "test": "ava --concurrency 1 --serial", - "test:copilot:e2e": "ava \"e2e/copilot.e2e.ts\"", + "test:copilot:e2e": "ava \"tests/**/copilot-*.e2e.ts\"", "test:copilot:spec": "ava \"tests/**/copilot-*.spec.ts\"", "test:coverage": "c8 ava --concurrency 1 --serial", - "test:copilot:e2e:coverage": "c8 ava --timeout=5m \"e2e/copilot.e2e.ts\"", + "test:copilot:e2e:coverage": "c8 ava --timeout=5m \"tests/**/copilot-*.e2e.ts\"", "test:copilot:spec:coverage": "c8 ava --timeout=5m \"tests/**/copilot-*.spec.ts\"", "postinstall": "prisma generate", "data-migration": "node --loader ts-node/esm/transpile-only.mjs ./src/data/index.ts",