Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update version and checking failure #39138

Merged
merged 17 commits into from
Feb 13, 2025
Merged
8 changes: 4 additions & 4 deletions .github/workflows/build-client-server-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ jobs:
fi

- name: Add a comment on the PR with new CI failures
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand All @@ -328,7 +328,7 @@ jobs:
```

- name: Add a comment on the PR when ci-test-limited is successful
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand Down Expand Up @@ -473,7 +473,7 @@ jobs:
fi

- name: Add a comment on the PR with new CI failures
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand All @@ -487,7 +487,7 @@ jobs:
```

- name: Add a comment on the PR when ci-test-limited-existing-docker-image is success
if: env.ci_test_failed == 'true' && needs.file-check.outputs.pr != '0'
if: env.ci_test_failed != 'true' && needs.file-check.outputs.pr != '0'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{fromJson(needs.file-check.outputs.pr)}}
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ jobs:
fi

- name: Run the cypress test
uses: cypress-io/github-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
Expand Down Expand Up @@ -371,13 +370,21 @@ jobs:
CYPRESS_SNOWFLAKE_ACCOUNT_NAME: ${{ secrets.SNOWFLAKE_ACCOUNT_NAME }}
CYPRESS_SNOWFLAKE_USERNAME: ${{ secrets.SNOWFLAKE_USERNAME }}
CYPRESS_SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
with:
browser: ${{ env.BROWSER_PATH }}
install: false
config-file: cypress_ci_custom.config.ts
spec: ${{ inputs.spec }}
working-directory: app/client
env: "NODE_ENV=development"
NODE_ENV: development
run: |
cd app/client
ls -la
if [[ -n "${{ inputs.spec }}" ]]; then
npx cypress-repeat-pro run -n 3 --rerun-failed-only \
--spec "${{ inputs.spec }}" \
--config-file "cypress_ci_custom.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
else
npx cypress-repeat-pro run -n 3 --rerun-failed-only \
--config-file "cypress_ci_custom.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
fi
cat cy-repeat-summary.txt
sagar-qa007 marked this conversation as resolved.
Show resolved Hide resolved

- name: Trim number of cypress log files
if: failure()
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,26 +434,29 @@ jobs:
CYPRESS_updateSnapshots=true npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \
--spec "${{ inputs.specs_to_run }}" \
--config-file "cypress_ci_custom.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
--browser "${{ env.BROWSER_PATH }}" || echo "Cypress tests failed, proceeding with summary check..."
else
echo "Running Cypress tests without snapshot updates..."
npx cypress-repeat-pro run -n "${{ inputs.run_count }}" --force \
--spec "${{ env.specs_to_run }}" \
--config-file "cypress_ci_custom.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
--browser "${{ env.BROWSER_PATH }}" || echo "Cypress tests failed, proceeding with summary check..."
fi

cat cy-repeat-summary.txt

# Define the path for the failure flag file
FAILURE_FLAG_FILE="ci_test_status.txt"

# Check for test results and store the status in the file
if ! grep -q "Total Failed: 0" cy-repeat-summary.txt; then
echo "ci_test_failed=true" > "$FAILURE_FLAG_FILE"
echo "ci_test_failed=true" > "$FAILURE_FLAG_FILE"
else
echo "ci_test_failed=false" > "$FAILURE_FLAG_FILE"
echo "ci_test_failed=false" > "$FAILURE_FLAG_FILE"
fi
cat "$FAILURE_FLAG_FILE"

cat "$FAILURE_FLAG_FILE"

- name: Trim number of cypress log files
if: failure()
run: |
Expand Down
4 changes: 2 additions & 2 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"craco-alias": "^2.1.1",
"craco-babel-loader": "^1.0.4",
"cypress-log-to-output": "^1.1.2",
"cypress-repeat-pro": "^1.0.1",
"cypress-repeat-pro": "^1.0.9",
"d3-geo": "^3.1.0",
"date-fns": "^4.1.0",
"dayjs": "^1.10.6",
Expand Down Expand Up @@ -388,4 +388,4 @@
"@types/react": "^17.0.2",
"postcss": "8.4.31"
}
}
}
33 changes: 11 additions & 22 deletions app/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13272,7 +13272,7 @@ __metadata:
cypress-network-idle: ^1.14.2
cypress-plugin-tab: ^1.0.5
cypress-real-events: ^1.8.1
cypress-repeat-pro: ^1.0.1
cypress-repeat-pro: ^1.0.9
cypress-tags: ^1.1.2
cypress-terminal-report: ^5.3.6
cypress-wait-until: ^1.7.2
Expand Down Expand Up @@ -16571,19 +16571,20 @@ __metadata:
languageName: node
linkType: hard

"cypress-repeat-pro@npm:^1.0.1":
version: 1.0.1
resolution: "cypress-repeat-pro@npm:1.0.1"
"cypress-repeat-pro@npm:^1.0.9":
version: 1.0.9
resolution: "cypress-repeat-pro@npm:1.0.9"
dependencies:
"@cypress/grep": ^4.0.1
arg: 5.0.2
bluebird: 3.7.2
debug: 4.3.5
debug: ^4.4.0
dotenv: 8.2.0
peerDependencies:
cypress: ">=5.3.0"
bin:
cypress-repeat-pro: index.js
checksum: e62a21479b62a5d5624ce21bdd8204afd754082d851d5fc712ad76e39ca2cfe6d446c2a1434025be77fa9d76fa257609285879e9841efecc26be4d25454fb732
checksum: 34d5e7a450c73c23085a30424ba748973cb697a9bdb906772864a3f42f6982bd301eb4722d62e2b02b340dfebfd7d9b5369783d077e4b82825001e64e795143e
languageName: node
linkType: hard

Expand Down Expand Up @@ -16790,15 +16791,15 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4":
version: 4.3.7
resolution: "debug@npm:4.3.7"
"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.4.0":
version: 4.4.0
resolution: "debug@npm:4.4.0"
dependencies:
ms: ^2.1.3
peerDependenciesMeta:
supports-color:
optional: true
checksum: 822d74e209cd910ef0802d261b150314bbcf36c582ccdbb3e70f0894823c17e49a50d3e66d96b633524263975ca16b6a833f3e3b7e030c157169a5fabac63160
checksum: fb42df878dd0e22816fc56e1fdca9da73caa85212fbe40c868b1295a6878f9101ae684f4eeef516c13acfc700f5ea07f1136954f43d4cd2d477a811144136479
languageName: node
linkType: hard

Expand All @@ -16814,18 +16815,6 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:4.3.5":
version: 4.3.5
resolution: "debug@npm:4.3.5"
dependencies:
ms: 2.1.2
peerDependenciesMeta:
supports-color:
optional: true
checksum: 7c002b51e256257f936dda09eb37167df952758c57badf6bf44bdc40b89a4bcb8e5a0a2e4c7b53f97c69e2970dd5272d33a757378a12c8f8e64ea7bf99e8e86e
languageName: node
linkType: hard

"debug@npm:^3.1.0, debug@npm:^3.2.7":
version: 3.2.7
resolution: "debug@npm:3.2.7"
Expand Down
Loading