Skip to content

Commit

Permalink
Minor changes to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Jun 2, 2024
1 parent 118b418 commit 490e74e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
run: npm ci
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Get Current Deployment URL
run: |
DEPLOYMENT_URL=$(vercel ls --json | jq -r '.[0].url')
echo "Deployment URL: $DEPLOYMENT_URL"
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
Expand All @@ -37,4 +41,4 @@ jobs:
retention-days: 30
- name: Rollback Deployment on Test Failure
if: ${{ failure() }}
run: vercel rollback --token=${{ secrets.VERCEL_TOKEN }}
run: vercel rollback --url $DEPLOYMENT_URL --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion tests/intro.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test("Displays the landing page correctly and triggers rollback on failure", asy
await page.goto(`${baseURL}`);

// Intentionally fail the test by expecting a non-existent element
await expect(page.getByText("NonExistentElement")).toBeVisible(); // This will intentionally fail the test
// await expect(page.getByText("NonExistentElement")).toBeVisible(); // This will intentionally fail the test

// If the test reaches this point, the intentional failure did not occur
// This line should not be reached if the test fails as expected
Expand Down

0 comments on commit 490e74e

Please sign in to comment.