-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use GH actions for acceptance tests (#1656)
Added ANSWERS.setGeolocation to all acceptance testing fixtures. Without these, a number of acceptance tests would pretty consistently fail. This seems to have been due to GH runners having a different location than CircleCI runners, resulting in different API responses. We already set the geolocation in the theme's acceptance tests. I included the useragent tests in the acceptance test workflow, despite them also being considered part of "miscellaneous tests". I felt like it's nice to have all the browserstack tests in one place. J=SLAP-1815 TEST=manual,auto see the acceptance tests run in parallel saw that the `if` statement in the acceptance script works #1657
- Loading branch information
Showing
20 changed files
with
146 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
export BROWSERSTACK_USE_AUTOMATE="1" | ||
export BROWSERSTACK_PROJECT_NAME="Answers SDK" | ||
export BROWSERSTACK_BUILD_ID="${GITHUB_REF_NAME} - ${GITHUB_RUN_ID}" | ||
COMMIT_MSG_TITLE=$(git log -n 1 --pretty=format:%s) | ||
export BROWSERSTACK_TEST_RUN_NAME=$COMMIT_MSG_TITLE | ||
|
||
if [[ $GITHUB_REF_NAME == release/* | ||
|| $GITHUB_REF_NAME == hotfix/* | ||
|| $GITHUB_REF_NAME == master | ||
|| $GITHUB_REF_NAME == support/* ]] | ||
then | ||
npx testcafe "browserstack:ie@11.0,browserstack:safari" --config-file ./.github/testcafe.json -q | ||
else | ||
npx testcafe -c 2 "browserstack:ie@11.0" --config-file ./.github/testcafe.json -q | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
if [[ $GITHUB_REF_NAME == release/* | ||
|| $GITHUB_REF_NAME == hotfix/* | ||
|| $GITHUB_REF_NAME == master | ||
|| $GITHUB_REF_NAME == support/* ]] | ||
then | ||
npx testcafe -c 3 "chrome:headless,firefox:headless" --config-file ./.github/testcafe.json -q | ||
else | ||
npx testcafe -c 3 "chrome:headless" --config-file ./.github/testcafe.json -q | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
export BROWSERSTACK_USE_AUTOMATE="1" | ||
export BROWSERSTACK_PROJECT_NAME="Answers SDK" | ||
export BROWSERSTACK_BUILD_ID="${GITHUB_REF_NAME} - ${GITHUB_RUN_ID}" | ||
COMMIT_MSG_TITLE=$(git log -n 1 --pretty=format:%s) | ||
export BROWSERSTACK_TEST_RUN_NAME=$COMMIT_MSG_TITLE | ||
|
||
npx testcafe chrome:headless,firefox:headless,browserstack:safari,browserstack:edge tests/acceptance/useragent/useragentsuite.js --config-file ./.github/testcafe.json |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Run acceptance tests | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
BROWSERSTACK_USERNAME: | ||
required: true | ||
BROWSERSTACK_ACCESS_KEY: | ||
required: true | ||
|
||
jobs: | ||
headless_acceptance: | ||
name: Headless Acceptance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Download build-output artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build-output | ||
path: dist/ | ||
- run: ./.github/run_headless_acceptance.sh | ||
|
||
browserstack_acceptance: | ||
name: Browserstack Acceptance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Download build-output artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build-output | ||
path: dist/ | ||
- run: ./.github/run_browserstack_acceptance.sh | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
|
||
useragent: | ||
name: Useragent Acceptance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Download build-output artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build-output | ||
path: dist/ | ||
- run: ./.github/run_useragent_acceptance.sh | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters