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 8ab55cf
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions .github/workflows/dev.yaml
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,38 @@ jobs:
env:
ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}

- uses: saucelabs/saucectl-run-action@v4.3.0
- name: Start Sauce Connect Tunnel
uses: saucelabs/sauce-connect-action@v2.3.7
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: 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:Safari@latest:macOS 13,saucelabs:Firefox@latest:Windows 11,saucelabs:Chrome@latest:Windows 11" \
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 }}

- 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 8ab55cf

Please sign in to comment.