Skip to content

Commit

Permalink
Testcafe version 3.7.0 is still not supported by saucectl.
Browse files Browse the repository at this point in the history
  • Loading branch information
shammowla committed Nov 5, 2024
1 parent 03bc334 commit 212fa68
Showing 1 changed file with 42 additions and 10 deletions.
52 changes: 42 additions & 10 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 })

0 comments on commit 212fa68

Please sign in to comment.