Skip to content

Commit 823d7a2

Browse files
author
ci-bot
committed
run last test
1 parent 55e9392 commit 823d7a2

File tree

2 files changed

+75
-7
lines changed

2 files changed

+75
-7
lines changed

.circleci/config.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ parameters:
1616
type: enum
1717
enum: ["", "ai_panel", "ballot", "ballot_0_4_14", "blockchain", "bottom-bar", "circom", "code_format", "compile_run_widget", "compiler_api", "contract_flattener", "contract_verification", "debugger", "defaultLayout", "deploy_vefiry", "dgit_github", "dgit_local", "editor", "editorHoverContext", "editorReferences", "editor_error_marker", "editor_line_text", "eip1153", "eip7702", "environment-account", "erc721", "etherscan_api", "expandAllFolders", "fileExplorer", "fileManager_api", "file_decorator", "file_explorer_context_menu", "file_explorer_dragdrop", "file_explorer_multiselect", "generalSettings", "gist", "homeTab", "importFromGithub", "layout", "learneth", "libraryDeployment", "matomo-bot-detection", "matomo-consent", "metamask", "migrateFileSystem", "noir", "pinned_contracts", "pinned_plugin", "pluginManager", "plugin_api", "providers", "proxy_oz_v4", "proxy_oz_v5", "proxy_oz_v5_non_shanghai_runtime", "publishContract", "quickDapp_metamask", "recorder", "remixd", "runAndDeploy", "script-runner", "search", "signingMessage", "sol2uml", "solidityImport", "solidityUnittests", "specialFunctions", "staticAnalysis", "stressEditor", "templates", "terminal", "transactionExecution", "txListener", "uniswap_v4_core", "url", "usingWebWorker", "verticalIconsPanel", "vm_state", "vyper_api", "walkthrough", "workspace", "workspace_git"]
1818
default: ""
19+
run_last_test:
20+
type: boolean
21+
default: false
1922
run_flaky_tests:
2023
type: boolean
2124
default: false
@@ -32,6 +35,7 @@ parameters:
3235
type: boolean
3336
default: false
3437

38+
3539
# Resource sizing
3640
resource_class:
3741
type: enum
@@ -336,6 +340,58 @@ jobs:
336340
- store_artifacts:
337341
path: ./timings-current.json
338342

343+
remix-ide-browser-latest:
344+
docker:
345+
- image: cimg/node:20.19.0-browsers
346+
resource_class: << pipeline.parameters.resource_class >>
347+
working_directory: ~/remix-project
348+
steps:
349+
- checkout
350+
- attach_workspace:
351+
at: ~/remix-project
352+
- restore_cache:
353+
keys:
354+
- v1-deps-{{ checksum "yarn.lock" }}
355+
- run: yarn
356+
- run:
357+
name: Unpack dist from workspace
358+
command: |
359+
if [ -f remix-dist.tar.gz ]; then
360+
tar -xzf remix-dist.tar.gz
361+
fi
362+
- run: ls -la ./dist/apps/remix-ide/assets/js || true
363+
- browser-tools/install-browser-tools:
364+
install-chrome: true
365+
install-chromedriver: false
366+
install-firefox: false
367+
install-geckodriver: false
368+
- run: yarn install_webdriver
369+
- run: google-chrome --version
370+
- run:
371+
name: Run most recently modified test (excluding groups)
372+
command: |
373+
set -e
374+
# Compute latest main test from source (exclude *_groupN and disabled tests)
375+
LATEST_SRC=$(find apps/remix-ide-e2e/src/tests -type f \( -name "*.test.ts" -o -name "*.spec.ts" -o -name "*.test.js" -o -name "*.spec.js" \) \
376+
| grep -Ev '_group[0-9]+' \
377+
| xargs -I {} bash -c 'printf "%s\t%s\n" "$(stat -f %m {})" "{}"' \
378+
| sort -nr | head -n1 | cut -f2-)
379+
if [ -z "$LATEST_SRC" ]; then
380+
echo "No main tests found"; exit 1; fi
381+
echo "Latest test source: $LATEST_SRC"
382+
# Derive compiled JS basename
383+
BASENAME=$(basename "$LATEST_SRC")
384+
JSNAME=${BASENAME%.*}.js
385+
# Build pattern to match the compiled test exactly
386+
PATTERN="^${JSNAME}$"
387+
echo "Running pattern: $PATTERN"
388+
E2E_RETRIES=<< pipeline.parameters.e2e_retries >> \
389+
./apps/remix-ide/ci/singletest.sh chrome 1 nogroup "$PATTERN"
390+
- store_test_results:
391+
path: ./reports/tests
392+
- store_artifacts:
393+
path: ./reports/screenshots
394+
339395
plan-e2e-shards:
340396
docker:
341397
- image: cimg/node:20.19.0-browsers
@@ -788,3 +844,11 @@ workflows:
788844
- post-failed-report:
789845
requires:
790846
- build
847+
848+
run_last_test:
849+
when: << pipeline.parameters.run_last_test >>
850+
jobs:
851+
- build
852+
- remix-ide-browser-latest:
853+
requires:
854+
- build

scripts/update-e2e-keywords.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@ function collectKeywords() {
4040
if (!isTest && !isPluginApi) continue;
4141

4242
let name = base;
43-
// Strip known markers that appear before extension
44-
name = name.replace(/\.(flaky|pr)$/i, '');
45-
// Strip trailing .test or .spec
46-
name = name.replace(/\.(test|spec)$/i, '');
47-
// Strip trailing _group<digits>
48-
name = name.replace(/_group\d+$/i, '');
49-
// If the name still contains a trailing dot fragment (after prior replace), clean again
43+
// Strip known markers that appear before extension
44+
name = name.replace(/\.(flaky|pr)$/i, '');
45+
// Strip trailing .test or .spec
46+
name = name.replace(/\.(test|spec)$/i, '');
47+
// If this is a grouped test, skip entirely (exclude group tests)
48+
if (/_group\d+$/i.test(name)) {
49+
continue;
50+
}
51+
// Also guard against names that may still carry a trailing dot after prior replace
5052
name = name.replace(/\.$/, '');
53+
// If the name still contains a trailing dot fragment (after prior replace), clean again
54+
name = name.replace(/\.$/, '');
5155

5256
// Special case: some sources may embed additional dot markers before extension (handled above)
5357
// Keep hyphens and underscores as-is; they are meaningful in current enum.

0 commit comments

Comments
 (0)