From 58efb6e96aa3ad8ebe723ae3399eafa66403df56 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 8 May 2024 12:48:20 -0700 Subject: [PATCH 1/2] Update test_suite.yml --- .github/workflows/test_suite.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index 6a80d2e..93c70d0 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -26,8 +26,9 @@ env: jobs: - pre-deploy: - name: Pre-deploy checks + needs: pre-deploy + pre-deploy-test-suite: + name: Test Suite runs-on: ubuntu-latest services: redis: From 1c45951190338abef4191f2fab32e329a596f143 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 8 May 2024 12:50:02 -0700 Subject: [PATCH 2/2] Nick: --- .github/workflows/fly.yml | 36 ++++++++++++++++++ .github/workflows/test_suite.yml | 63 -------------------------------- 2 files changed, 36 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/test_suite.yml diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml index 526e968..c31df9d 100644 --- a/.github/workflows/fly.yml +++ b/.github/workflows/fly.yml @@ -58,6 +58,42 @@ jobs: run: | npm run test:prod working-directory: ./apps/api + + pre-deploy-test-suite: + name: Test Suite + runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + steps: + - uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "20" + - name: Install pnpm + run: npm install -g pnpm + - name: Install dependencies + run: pnpm install + working-directory: ./apps/api + - name: Start the application + run: npm start & + working-directory: ./apps/api + id: start_app + - name: Start workers + run: npm run workers & + working-directory: ./apps/api + id: start_workers + - name: Install dependencies + run: pnpm install + working-directory: ./apps/test-suite + - name: Run E2E tests + run: | + npm run test + working-directory: ./apps/test-suite + deploy: name: Deploy app runs-on: ubuntu-latest diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml deleted file mode 100644 index 93c70d0..0000000 --- a/.github/workflows/test_suite.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Test Suite -on: - push: - branches: - - main - -env: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }} - FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - HOST: ${{ secrets.HOST }} - LLAMAPARSE_API_KEY: ${{ secrets.LLAMAPARSE_API_KEY }} - LOGTAIL_KEY: ${{ secrets.LOGTAIL_KEY }} - POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} - NUM_WORKERS_PER_QUEUE: ${{ secrets.NUM_WORKERS_PER_QUEUE }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - PLAYWRIGHT_MICROSERVICE_URL: ${{ secrets.PLAYWRIGHT_MICROSERVICE_URL }} - PORT: ${{ secrets.PORT }} - REDIS_URL: ${{ secrets.REDIS_URL }} - SCRAPING_BEE_API_KEY: ${{ secrets.SCRAPING_BEE_API_KEY }} - SUPABASE_ANON_TOKEN: ${{ secrets.SUPABASE_ANON_TOKEN }} - SUPABASE_SERVICE_TOKEN: ${{ secrets.SUPABASE_SERVICE_TOKEN }} - SUPABASE_URL: ${{ secrets.SUPABASE_URL }} - TEST_API_KEY: ${{ secrets.TEST_API_KEY }} - - -jobs: - needs: pre-deploy - pre-deploy-test-suite: - name: Test Suite - runs-on: ubuntu-latest - services: - redis: - image: redis - ports: - - 6379:6379 - steps: - - uses: actions/checkout@v3 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: "20" - - name: Install pnpm - run: npm install -g pnpm - - name: Install dependencies - run: pnpm install - working-directory: ./apps/api - - name: Start the application - run: npm start & - working-directory: ./apps/api - id: start_app - - name: Start workers - run: npm run workers & - working-directory: ./apps/api - id: start_workers - - name: Install dependencies - run: pnpm install - working-directory: ./apps/test-suite - - name: Run E2E tests - run: | - npm run test - working-directory: ./apps/test-suite \ No newline at end of file