Skip to content

Commit

Permalink
cypress update
Browse files Browse the repository at this point in the history
  • Loading branch information
david emioma committed Mar 15, 2024
1 parent 610903d commit 882b5ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
preview-url: ${{ steps.deploy.outputs.preview-url }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "20"

Expand All @@ -26,7 +26,7 @@ jobs:

- name: Deploy to Vercel Preview
id: deploy
uses: amondnet/vercel-action@v20
uses: amondnet/vercel-action@v21
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
Expand All @@ -39,10 +39,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "20"

Expand All @@ -51,8 +51,6 @@ jobs:

- name: Run Jest Tests
run: npm test
env:
NEXT_PUBLIC_APP_URL: ${{ needs.preview-deployment.outputs.preview-url }}

- name: Run Cypress Tests
uses: cypress-io/github-action@v2
Expand All @@ -62,7 +60,6 @@ jobs:
command: npm run cypress:run
env:
CYPRESS_BASE_URL: ${{ needs.preview-deployment.outputs.preview-url }}
NEXT_PUBLIC_APP_URL: ${{ needs.preview-deployment.outputs.preview-url }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
TEST_STORE_ID: ${{ secrets.TEST_STORE_ID }}
TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
Expand All @@ -81,7 +78,7 @@ jobs:
- uses: actions/checkout@v3

- name: Deploy to Vercel Production
uses: amondnet/vercel-action@v20
uses: amondnet/vercel-action@v21
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
Expand Down
4 changes: 2 additions & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
setupNodeEvents(on, config) {
// implement node event listeners here
},
baseUrl: process.env.NEXT_PUBLIC_APP_URL,
baseUrl: process.env.CYPRESS_BASE_URL,
env: {
auth_storeId: process.env.TEST_STORE_ID,
auth_email: process.env.TEST_EMAIL,
Expand All @@ -16,7 +16,7 @@ export default defineConfig({
test_user_productId: process.env.TEST_USER_PRODUCT_ID,
user_email: process.env.TEST_USER_EMAIL,
user_password: process.env.TEST_USER_PASSWORD,
public_url: process.env.NEXT_PUBLIC_APP_URL,
public_url: process.env.CYPRESS_BASE_URL,
},
},
});

0 comments on commit 882b5ca

Please sign in to comment.