Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,24 @@ jobs:
chmod a+x ./cypress/setup-test-ci.sh
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
# - uses: browser-actions/setup-chrome@latest
# id: setup-chrome
# with:
# chrome-version: 129
# install-chromedriver: true
# install-dependencies: true
# - run: |
# echo "BROWSER_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
# ${{ steps.setup-chrome.outputs.chrome-path }} --version

- name: Install Google Chrome 129.0.6668.100
run: |
CHROME_VERSION=129.0.6668.100
Comment thread
sagar-qa007 marked this conversation as resolved.
Outdated
wget -q https://dl.google.com/linux/direct/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./google-chrome-stable_${CHROME_VERSION}-1_amd64.deb
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
google-chrome --version
Comment thread
sagar-qa007 marked this conversation as resolved.
Comment on lines +257 to +264

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Remove manual Chrome installation and use browser-actions/setup-chrome

The current Chrome installation has several critical issues:

  1. Chrome version 129.0.6668.100 is not yet released (current stable is 120)
  2. Direct downloads without verification pose security risks
  3. The installation URL will fail as this version doesn't exist

Replace the manual installation with the browser-actions/setup-chrome action:

-      - name: Install Google Chrome 129.0.6668.100
-        run: |
-          sudo apt-get remove google-chrome-stable
-          wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
-          sudo apt-get update
-          sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
-          echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
-          google-chrome --version
+      - uses: browser-actions/setup-chrome@latest
+        id: setup-chrome
+        with:
+          chrome-version: '120'
+          install-chromedriver: true
+          install-dependencies: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install Google Chrome 129.0.6668.100
run: |
sudo apt-get remove google-chrome-stable
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
google-chrome --version
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: '120'
install-chromedriver: true
install-dependencies: true
🧰 Tools
🪛 actionlint (1.7.4)

258-258: shellcheck reported issue in this script: SC2086:info:5:47: Double quote to prevent globbing and word splitting

(shellcheck)


- name: Save Git values
# pass env variables from this step to other steps
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci-test-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,14 @@ jobs:
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
chrome-version: 129

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Chrome version 129 is too far ahead of current stable releases

The project uses Cypress 13.13.0 for testing, and Chrome 129 is not yet released (current stable is 120). Using unreleased browser versions in CI can lead to instability.

  • Recommend using Chrome version 120 or lower to match current stable releases
  • Update .github/workflows/ci-test-hosted.yml line 142
🔗 Analysis chain

Verify Chrome version compatibility with test suite

The change to Chrome version 129 should be validated against the test suite requirements and browser compatibility matrix.

Consider implementing browser version compatibility checks in the test suite to prevent issues with future version updates.


Let me check the specific browser version requirements in these files.


Let me check the Cypress configuration to understand browser testing requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Chrome version compatibility with test suite
# Look for any browser version specific code or configurations
rg -g '*.{ts,js,json}' -l 'chrome.*version|browser.*version' app/client/

Length of output: 261


Script:

#!/bin/bash
# Check the content of files for Chrome version references
rg -g '*.{ts,js,json}' 'chrome.*version|browser.*version' app/client/test/factories/MockPluginsState.ts
rg -g '*.{ts,js,json}' 'chrome.*version|browser.*version' app/client/cypress/fixtures/CommunityIssuesExport.json

# Check package.json for any browser dependencies
rg -g 'package.json' '"(cypress|playwright|puppeteer|selenium)"' .

# Check for any browser configuration in Cypress
fd -g 'cypress.config.*' .

Length of output: 66731


Script:

#!/bin/bash
# Check Cypress configuration and browser settings
fd -t f -e json -e js cypress.config
fd -t f package.json -x cat {} \; | grep -A 5 -B 5 '"cypress":'

Length of output: 520

install-chromedriver: true
install-dependencies: true
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
echo "BROWSER_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
${{ steps.setup-chrome.outputs.chrome-path }} --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,14 @@ jobs:
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
chrome-version: 129
install-chromedriver: true
install-dependencies: true
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
echo "BROWSER_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
${{ steps.setup-chrome.outputs.chrome-path }} --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down Expand Up @@ -348,7 +352,8 @@ jobs:
cd app/client
npx cypress-repeat-pro run -n ${{ inputs.run_count }} --force \
--spec ${{ env.specs_to_run }} \
--config-file "cypress_ci_custom.config.ts"
--config-file "cypress_ci_custom.config.ts" \
--browser ${{ env.BROWSER_PATH }}
cat cy-repeat-summary.txt
# Define the path for the failure flag file
FAILURE_FLAG_FILE="ci_test_status.txt"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci-test-limited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,16 @@ jobs:
cd app/client
chmod a+x ./cypress/setup-test-ci.sh
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
chrome-version: 129
install-chromedriver: true
install-dependencies: true
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
echo "BROWSER_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
${{ steps.setup-chrome.outputs.chrome-path }} --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down Expand Up @@ -336,7 +340,7 @@ jobs:
CYPRESS_S3_SECRET: ${{ secrets.CYPRESS_S3_SECRET }}
CYPRESS_STATIC_ALLOCATION: true
with:
browser: ${{ env.BROWSER_PATH }}
browser: /opt/hostedtoolcache/setup-chrome/chromium/129.0.6668.100/x64/chrome
install: false
config-file: cypress_ci_custom.config.ts
spec: ${{ env.specs_to_run }}
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts
# For running all specs - uncomment below:
#cypress/e2e/**/**/*

Expand Down