From 103a137faeaa67c4e09ad8d5e0eaa3724f5f7b7d Mon Sep 17 00:00:00 2001 From: Hafizah Muhyideen <40233874+justfizah@users.noreply.github.com> Date: Wed, 8 Jan 2025 08:10:57 +0100 Subject: [PATCH] Chore: Update workflow --- .github/workflows/playwright.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index e548648..05be1b0 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -30,6 +30,12 @@ jobs: - name: Install Playwright Browsers run: yarn playwright install --with-deps + - name: Verify GraphQL API availability + run: | + curl -X POST -H "Content-Type: application/json" \ + --data '{"query":"query { categories { id name } }"}' \ + https://api.kwekmarket.com/v1/kwekql || exit 1 + - name: Build the application run: yarn build # Ensure your app has a build step @@ -42,6 +48,9 @@ jobs: run: npx wait-on http://localhost:3100 - name: Run Playwright tests + env: + GRAPHQL_API_URL: https://api.kwekmarket.com/v1/kwekql + PORT: 3100 run: yarn playwright test - uses: actions/upload-artifact@v4 @@ -50,5 +59,3 @@ jobs: name: playwright-report path: playwright-report/ retention-days: 30 - -