diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 63169cd79..ceaca60e6 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -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/saucectl-run-action@v4.3.0 - # 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/saucectl-run-action@v4.3.0 + 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<> $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<> $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 @@ -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/saucectl-run-action@v4.3.0 - # 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/saucectl-run-action@v4.3.0 + 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 }} \ No newline at end of file + - 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 }} \ No newline at end of file diff --git a/test/functional/specs/LibraryInfo/C2589.js b/test/functional/specs/LibraryInfo/C2589.js index a3f888d29..26aa80fdb 100644 --- a/test/functional/specs/LibraryInfo/C2589.js +++ b/test/functional/specs/LibraryInfo/C2589.js @@ -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);