Skip to content

Commit

Permalink
fix: fail faster
Browse files Browse the repository at this point in the history
  • Loading branch information
edd committed Oct 25, 2023
1 parent fdbe3e3 commit 38dc8fe
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/E2ETests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ jobs:
cypress-run:
runs-on: ubuntu-20.04
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving Cypress Cloud hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run n copies of the current job in parallel
node: [16.18]
node: [18]
steps:
- name: Waiting for 200 from the Vercel Preview
uses: patrickedqvist/[email protected]
Expand All @@ -31,11 +26,18 @@ jobs:
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v6
with:
wait-on: ${{steps.previewUrl.outputs.url}}
config: baseUrl="${{steps.previewUrl.outputs.url}}"
env:
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Upload failure screenshots'
if: failure()
uses: actions/upload-artifact@v3
with:
path: cypress/screenshots/
retention-days: 2
40 changes: 35 additions & 5 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,92 @@
},
"redirects": [
{
"source": "/:path((?!restricted|assets).*)",
"source": "/:path((?!restricted|static)[^.]*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "US"
}
],
"missing": [
{
"type": "cookie",
"key": "skip-geo-redirect"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"source": "/:path((?!restricted|static)[^.]*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "CU"
}
],
"missing": [
{
"type": "cookie",
"key": "skip-geo-redirect"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"source": "/:path((?!restricted|static)[^.]*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "KP"
}
],
"missing": [
{
"type": "cookie",
"key": "skip-geo-redirect"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"source": "/:path((?!restricted|static)[^.]*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "IR"
}
],
"missing": [
{
"type": "cookie",
"key": "skip-geo-redirect"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted).*)",
"source": "/:path((?!restricted|static)[^.]*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "SY"
}
],
"missing": [
{
"type": "cookie",
"key": "skip-geo-redirect"
}
],
"permanent": false,
"destination": "/restricted"
},
Expand Down

0 comments on commit 38dc8fe

Please sign in to comment.