From a7e1a1763ca51a540162af912d12da0b6b069226 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Thu, 4 Jul 2024 21:12:34 +0000 Subject: [PATCH] feat: AGAIN changed metology of starting e2e tests, now after deployment-status is changed and url is active. No more certs in tests dir, aliluya, and all for github only. Gitea CI was made not by dufok, so let it be --- .github/workflows/e2e-tests.yml | 37 +++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/e2e-tests.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 00000000..37fcfaf5 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,37 @@ +name: "e2e tests" + +on: + deployment_status: + types: [success] + +jobs: + e2e: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Wait for deployment to be live + run: | + echo "Waiting for Vercel deployment to be live..." + until curl -sSf https://testing3.discours.io > /dev/null; do + printf '.' + sleep 10 + done + + - name: Install Playwright and dependencies + run: npm run e2e:install + + - name: Run Playwright tests + run: npm run e2e:tests:ci + env: + BASE_URL: https://testing3.discours.io diff --git a/package.json b/package.json index 7c6bbeb6..fdef40a1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "vinxi start", "codegen": "graphql-codegen", "e2e:tests": "npx playwright test --project=webkit", - "e2e:tests:ci": "CI=true BASE_URL=https://127.0.0.1:8080 npx playwright test --project=webkit", + "e2e:tests:ci": "CI=true npx playwright test --project=webkit", "e2e:install": "npx playwright install webkit && npx playwright install-deps ", "fix": "npx @biomejs/biome check . --fix && stylelint **/*.{scss,css} --fix", "format": "npx @biomejs/biome format src/. --write",