chore: cypress set up tweaks (#31926)
This commit is contained in:
parent
a02a2f5a96
commit
dfb9af36df
|
|
@ -138,7 +138,7 @@ jobs:
|
||||||
run: cypress-run-all ${{ env.USE_DASHBOARD }}
|
run: cypress-run-all ${{ env.USE_DASHBOARD }}
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: github.event_name == 'workflow_dispatch' && (steps.check.outputs.python || steps.check.outputs.frontend)
|
if: failure()
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
|
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
|
||||||
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}
|
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,16 @@ echo_step "1" "Complete" "Applying DB migrations"
|
||||||
|
|
||||||
# Create an admin user
|
# Create an admin user
|
||||||
echo_step "2" "Starting" "Setting up admin user ( admin / $ADMIN_PASSWORD )"
|
echo_step "2" "Starting" "Setting up admin user ( admin / $ADMIN_PASSWORD )"
|
||||||
superset fab create-admin \
|
if [ "$CYPRESS_CONFIG" == "true" ]; then
|
||||||
--username admin \
|
superset load_test_users
|
||||||
--firstname Superset \
|
else
|
||||||
--lastname Admin \
|
superset fab create-admin \
|
||||||
--email admin@superset.com \
|
--username admin \
|
||||||
--password "$ADMIN_PASSWORD"
|
--email admin@superset.com \
|
||||||
|
--password "$ADMIN_PASSWORD" \
|
||||||
|
--firstname Superset \
|
||||||
|
--lastname Admin
|
||||||
|
fi
|
||||||
echo_step "2" "Complete" "Setting up admin user"
|
echo_step "2" "Complete" "Setting up admin user"
|
||||||
# Create default roles and permissions
|
# Create default roles and permissions
|
||||||
echo_step "3" "Starting" "Setting up roles and perms"
|
echo_step "3" "Starting" "Setting up roles and perms"
|
||||||
|
|
@ -67,7 +71,6 @@ if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
|
||||||
echo_step "4" "Starting" "Loading examples"
|
echo_step "4" "Starting" "Loading examples"
|
||||||
# If Cypress run which consumes superset_test_config – load required data for tests
|
# If Cypress run which consumes superset_test_config – load required data for tests
|
||||||
if [ "$CYPRESS_CONFIG" == "true" ]; then
|
if [ "$CYPRESS_CONFIG" == "true" ]; then
|
||||||
superset load_test_users
|
|
||||||
superset load_examples --load-test-data
|
superset load_examples --load-test-data
|
||||||
else
|
else
|
||||||
superset load_examples
|
superset load_examples
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
XVFB_PRE_CMD = "xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' "
|
XVFB_PRE_CMD = "xvfb-run --auto-servernum --server-args='-screen 0, 1280x1024x24' "
|
||||||
REPO = os.getenv("GITHUB_REPOSITORY") or "apache/superset"
|
REPO = os.getenv("GITHUB_REPOSITORY") or "apache/superset"
|
||||||
GITHUB_EVENT_NAME = os.getenv("GITHUB_EVENT_NAME") or "push"
|
GITHUB_EVENT_NAME = os.getenv("GITHUB_EVENT_NAME") or "push"
|
||||||
CYPRESS_RECORD_KEY = os.getenv("CYPRESS_RECORD_KEY") or ""
|
CYPRESS_RECORD_KEY = os.getenv("CYPRESS_RECORD_KEY") or ""
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export default eyesPlugin(
|
||||||
defineConfig({
|
defineConfig({
|
||||||
chromeWebSecurity: false,
|
chromeWebSecurity: false,
|
||||||
defaultCommandTimeout: 8000,
|
defaultCommandTimeout: 8000,
|
||||||
numTestsKeptInMemory: 5,
|
numTestsKeptInMemory: 3,
|
||||||
// Disabled after realizing this MESSES UP rison encoding in intricate ways
|
// Disabled after realizing this MESSES UP rison encoding in intricate ways
|
||||||
experimentalFetchPolyfill: false,
|
experimentalFetchPolyfill: false,
|
||||||
experimentalMemoryManagement: true,
|
experimentalMemoryManagement: true,
|
||||||
|
|
@ -58,7 +58,15 @@ export default eyesPlugin(
|
||||||
});
|
});
|
||||||
|
|
||||||
launchOptions.args.push(
|
launchOptions.args.push(
|
||||||
...['--disable-dev-shm-usage', '--disable-gpu'],
|
'--disable-dev-shm-usage',
|
||||||
|
'--disable-gpu',
|
||||||
|
'--no-sandbox',
|
||||||
|
'--disable-software-rasterizer',
|
||||||
|
'--memory-pressure-off',
|
||||||
|
'--js-flags=--max-old-space-size=4096',
|
||||||
|
'--disable-background-timer-throttling',
|
||||||
|
'--disable-backgrounding-occluded-windows',
|
||||||
|
'--disable-renderer-backgrounding',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return launchOptions;
|
return launchOptions;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue