Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore: run website tests against netlify deployment#6212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -179,26 +179,38 @@ jobs: | ||
contents: read # to fetch code (actions/checkout) | ||
name: Website tests | ||
# We technically do not need to wait for build within the pipeline any more because the build we care about is happening within Netlify, however, | ||
# it is highly likely that if the CI one fails, the Netlify one will as well, so in order to not waste unncessary Github Actions minutes/resources, | ||
# we do still keep this requirement here. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. chuckles in#5573 | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Install | ||
uses: ./.github/actions/prepare-install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Wait for Netlify deployment | ||
uses: probablyup/wait-for-netlify-action@3.2.0 | ||
id: waitForDeployment | ||
with: | ||
site_id: '128d21c7-b2fe-45ad-b141-9878fcf5de3a' | ||
env: | ||
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | ||
- name: Run Playwright tests against the Netlify deployment | ||
run: yarn playwright test --reporter=list | ||
working-directory: packages/website | ||
env: | ||
PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitForDeployment.outputs.url }} | ||
- if: always() | ||
uses: actions/upload-artifact@v3 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -15,8 +15,6 @@ test.describe('Website', () => { | ||
} | ||
}); | ||
await page.goto('/'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This error message was only applicable to the local dev-server and is not shown to our users on production builds. A nice extra benefit of this approach is that our testing is more representative of our end UX | ||
expect(errorMessages).toStrictEqual([]); | ||
}); | ||
}); |