Skip to content

Commit

Permalink
Firefox get libraryinfo fixed, reenable chrome and safari tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
shammowla committed Sep 26, 2024
1 parent 11e6df7 commit 0efdb92
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 182 deletions.
360 changes: 180 additions & 180 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,106 +59,106 @@ jobs:
core.setOutput("matrixInput", JSON.stringify(matrixInput));
console.log("matrixInput: ", matrixInput);
# alloy-prod-e2e-safari:
# name: Safari
# needs: get-testing-tags
# runs-on: ubuntu-latest
# timeout-minutes: 60
# strategy:
# max-parallel: 10
# fail-fast: false
# matrix: ${{ fromJSON(needs.get-testing-tags.outputs.matrixInput) }}
# continue-on-error: true
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# ref: ${{ matrix.tag.tag }}
# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 22
# - name: Cache dependencies
# uses: actions/cache@v4
# id: npm-cache
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }}
# - name: Install dependencies
# if: steps.npm-cache.outputs.cache-hit != 'true'
# run: npm ci
# - name: Store Alloy version
# uses: nyaa8/package-version@v1
# - name: Download sauce configs
# uses: actions/download-artifact@v4
# with:
# name: sauce-config
# path: .sauce
# - name: Download sauce ignore
# uses: actions/download-artifact@v4
# with:
# name: sauce-ignore
# path: .
# - name: Build
# run: |
# echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV
# npm run test:functional:build:prod
# env:
# ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}
# BASE_CODE_MIN: true
# NPM_PACKAGE_PROD: true
# - name: Update Sauce Config with Node
# run: |
# sed -i 's/"$NODE_VERSION"/"${{ matrix.tag.nodeVersion }}"/g' .sauce/prod-safari.yml
# - name: Run Functional Tests
# id: saucectl
# uses: saucelabs/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# sauce-username: ${{ secrets.SAUCE_USERNAME }}
# sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
# env: |
# SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }}
# SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }}
# ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }}
# NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
# ALLOY_ENV=prod
# config-file: ./.sauce/prod-safari.yml
alloy-prod-e2e-safari:
name: Safari
needs: get-testing-tags
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 10
fail-fast: false
matrix: ${{ fromJSON(needs.get-testing-tags.outputs.matrixInput) }}
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ matrix.tag.tag }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }}
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Store Alloy version
uses: nyaa8/package-version@v1
- name: Download sauce configs
uses: actions/download-artifact@v4
with:
name: sauce-config
path: .sauce
- name: Download sauce ignore
uses: actions/download-artifact@v4
with:
name: sauce-ignore
path: .
- name: Build
run: |
echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV
npm run test:functional:build:prod
env:
ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}
BASE_CODE_MIN: true
NPM_PACKAGE_PROD: true
- name: Update Sauce Config with Node
run: |
sed -i 's/"$NODE_VERSION"/"${{ matrix.tag.nodeVersion }}"/g' .sauce/prod-safari.yml
- name: Run Functional Tests
id: saucectl
uses: saucelabs/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
env: |
SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }}
ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }}
NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
ALLOY_ENV=prod
config-file: ./.sauce/prod-safari.yml

# - name: Get Saucelabs Test Results
# if: failure()
# id: saucelabs-results
# env:
# SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
# SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
# run: |
# mkdir -p test-results
# if [ -d "./test-results" ] && [ "$(ls -A ./test-results)" ]; then
# cp -r ./test-results/* ./test-results/
# echo "TEST_RESULTS<<EOF" >> $GITHUB_ENV
# cat ./test-results/* >> $GITHUB_ENV
# echo "EOF" >> $GITHUB_ENV
# else
# echo "TEST_RESULTS=No test results found in ./test-results/" >> $GITHUB_ENV
# fi
- name: Get Saucelabs Test Results
if: failure()
id: saucelabs-results
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: |
mkdir -p test-results
if [ -d "./test-results" ] && [ "$(ls -A ./test-results)" ]; then
cp -r ./test-results/* ./test-results/
echo "TEST_RESULTS<<EOF" >> $GITHUB_ENV
cat ./test-results/* >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "TEST_RESULTS=No test results found in ./test-results/" >> $GITHUB_ENV
fi
# - name: Notify Slack on Failure
# if: failure()
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow
# text: |
# Alloy Prod Firefox Tests Failed
# Job ID: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
# Build: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').build }}
# Status: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').status }}
# Error: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').error }}
# Full Results: https://app.saucelabs.com/tests/${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Notify Slack on Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow
text: |
Alloy Prod Firefox Tests Failed
Job ID: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
Build: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').build }}
Status: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').status }}
Error: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').error }}
Full Results: https://app.saucelabs.com/tests/${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

alloy-prod-e2e-firefox:
name: Firefox
Expand Down Expand Up @@ -261,86 +261,86 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# alloy-prod-e2e-chrome:
# name: Chrome
# needs: get-testing-tags
# runs-on: ubuntu-latest
# timeout-minutes: 60
# strategy:
# max-parallel: 10
# fail-fast: false
# matrix: ${{ fromJSON(needs.get-testing-tags.outputs.matrixInput) }}
# continue-on-error: true
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# ref: ${{ matrix.tag.tag }}
# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 22
# - name: Cache dependencies
# uses: actions/cache@v4
# id: npm-cache
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }}
# - name: Install dependencies
# if: steps.npm-cache.outputs.cache-hit != 'true'
# run: npm ci
# - name: Store Alloy version
# uses: nyaa8/package-version@v1
# - name: Download sauce configs
# uses: actions/download-artifact@v4
# with:
# name: sauce-config
# path: .sauce
# - name: Download sauce ignore
# uses: actions/download-artifact@v4
# with:
# name: sauce-ignore
# path: .
# - name: Build
# run: |
# echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV
# npm run test:functional:build:prod
# env:
# ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}
# BASE_CODE_MIN: true
# NPM_PACKAGE_PROD: true
# - name: Update Sauce Config with Node
# run: |
# sed -i 's/"$NODE_VERSION"/"${{ matrix.tag.nodeVersion }}"/g' .sauce/prod-chrome.yml
# - name: Run Functional Tests
# id: saucectl
# uses: saucelabs/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# sauce-username: ${{ secrets.SAUCE_USERNAME }}
# sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
# env: |
# SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }}
# SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }}
# ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }}
# NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
# ALLOY_ENV=prod
# config-file: ./.sauce/prod-chrome.yml
alloy-prod-e2e-chrome:
name: Chrome
needs: get-testing-tags
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 10
fail-fast: false
matrix: ${{ fromJSON(needs.get-testing-tags.outputs.matrixInput) }}
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ matrix.tag.tag }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }}
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Store Alloy version
uses: nyaa8/package-version@v1
- name: Download sauce configs
uses: actions/download-artifact@v4
with:
name: sauce-config
path: .sauce
- name: Download sauce ignore
uses: actions/download-artifact@v4
with:
name: sauce-ignore
path: .
- name: Build
run: |
echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV
npm run test:functional:build:prod
env:
ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }}
BASE_CODE_MIN: true
NPM_PACKAGE_PROD: true
- name: Update Sauce Config with Node
run: |
sed -i 's/"$NODE_VERSION"/"${{ matrix.tag.nodeVersion }}"/g' .sauce/prod-chrome.yml
- name: Run Functional Tests
id: saucectl
uses: saucelabs/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
env: |
SAUCE_USERNAME=${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY=${{ secrets.SAUCE_ACCESS_KEY }}
ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }}
NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
ALLOY_ENV=prod
config-file: ./.sauce/prod-chrome.yml

# - name: Notify Slack on Failure
# if: failure()
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow
# text: |
# Alloy Prod Firefox Tests Failed
# Job ID: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
# Build: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').build }}
# Status: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').status }}
# Error: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').error }}
# Full Results: https://app.saucelabs.com/tests/${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Notify Slack on Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow
text: |
Alloy Prod Firefox Tests Failed
Job ID: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
Build: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').build }}
Status: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').status }}
Error: ${{ fromJson(steps.saucelabs-results.outputs.results || '{}').error }}
Full Results: https://app.saucelabs.com/tests/${{ fromJson(steps.saucelabs-results.outputs.results || '{}').id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2 changes: 0 additions & 2 deletions test/functional/specs/LibraryInfo/C2589.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ test("C2589: getLibraryInfo command returns library information.", async () => {
},
};

console.log("Current Version:", currentVersion); // Add this line for debugging
const alloy = createAlloyProxy();
await alloy.configure(debugEnabledConfig);
const { libraryInfo } = await alloy.getLibraryInfo();
console.log("Library Info Version:", libraryInfo.version); // Add this line for debugging
delete libraryInfo.configs.edgeBasePath;
await t.expect(libraryInfo.version).eql(currentVersion);
await t.expect(libraryInfo.commands).eql(currentCommand);
Expand Down

0 comments on commit 0efdb92

Please sign in to comment.