-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testcafe version 3.7.0 is still not supported by saucectl.
- Loading branch information
Showing
1 changed file
with
42 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ jobs: | |
JOB_NUMBER: $GITHUB_JOB | ||
|
||
alloy-int-e2e: | ||
name: "Dev Functional Test - Saucectl" | ||
name: "Dev Functional Test - TestCafe" | ||
runs-on: ubuntu-latest | ||
needs: unit-test | ||
timeout-minutes: 60 | ||
|
@@ -80,7 +80,7 @@ jobs: | |
id: npm-cache | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }} # increment NPM_CACHE_VERSION secret to force cache reset | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }} | ||
|
||
- name: Store Alloy version into env | ||
uses: nyaa8/package-version@v1 | ||
|
@@ -94,14 +94,46 @@ jobs: | |
env: | ||
ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }} | ||
|
||
- uses: saucelabs/[email protected] | ||
- name: Start Sauce Connect Tunnel | ||
uses: saucelabs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
sauce-username: ${{ secrets.SAUCE_USERNAME }} | ||
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
env: | | ||
ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }} | ||
NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} | ||
ALLOY_ENV=int | ||
config-file: ./.sauce/dev.yml | ||
username: ${{ secrets.SAUCE_USERNAME }} | ||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
tunnelIdentifier: ${{ env.SAUCE_TUNNEL_ID }} | ||
|
||
- name: Install TestCafe SauceLabs provider | ||
run: npm install testcafe-browser-provider-saucelabs | ||
|
||
- name: Run TestCafe Tests | ||
run: | | ||
ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }} \ | ||
NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} \ | ||
ALLOY_ENV=int \ | ||
EDGE_BASE_PATH=ee-pre-prd \ | ||
npx testcafe "saucelabs:Chrome@latest:Windows 11" \ | ||
"saucelabs:Firefox@latest:Windows 11" \ | ||
"saucelabs:Safari@latest:macOS 13" \ | ||
test/functional/specs/**/*.js \ | ||
--reporter spec,saucelabs \ | ||
--skip-js-errors \ | ||
--disable-page-caching \ | ||
--page-load-timeout 5000 \ | ||
--speed 1 | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
SAUCE_TUNNEL_ID: ${{ env.SAUCE_TUNNEL_ID }} | ||
SAUCE_PROJECT_NAME: "Alloy SDK Int ee-pre-prd" | ||
SAUCE_BUILD_NAME: "Build ${{ github.run_number }}" | ||
SAUCE_CAPABILITIES_OVERRIDES_PATH: "sauceLabsCapabilities.json" | ||
|
||
- name: Handle Test Failures | ||
if: failure() | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const handleTestFailures = require('./.github/scripts/handle-test-failures.js') | ||
await handleTestFailures({ github, context }) |