From 175c9b05972df7364abdee2bdb00a3af35c3bac4 Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Thu, 12 Jan 2023 09:33:01 -0800 Subject: [PATCH] Fix windows-latest cypress tests (#360) * [FEATURE] Detector must have at least one alert set #288 Signed-off-by: Jovan Cvetkovic * windows latest Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic * [TASK] Investigate cypress windows latest tests #351 Signed-off-by: Jovan Cvetkovic Signed-off-by: Jovan Cvetkovic Signed-off-by: AWSHurneyt --- .github/workflows/cypress-workflow.yml | 17 +++++++++++++++-- cypress.json | 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 45d21f968..10ea8e774 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -15,8 +15,10 @@ jobs: name: Run Cypress E2E tests strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] include: + - os: windows-latest + cypress_cache_folder: ~/AppData/Local/Cypress/Cache - os: ubuntu-latest cypress_cache_folder: ~/.cache/Cypress runs-on: ${{ matrix.os }} @@ -32,6 +34,10 @@ jobs: # TODO: Parse this from security analytics plugin (https://github.com/opensearch-project/security-analytics/issues/170) java-version: 11 + - name: Enable longer filenames + if: ${{ matrix.os == 'windows-latest' }} + run: git config --system core.longpaths true + - name: Checkout security analytics uses: actions/checkout@v2 with: @@ -87,7 +93,14 @@ jobs: yarn start --no-base-path --no-watch & shell: bash - - name: Sleep until OSD server starts + # Window is slow so wait longer + - name: Sleep until OSD server starts - windows + if: ${{ matrix.os == 'windows-latest' }} + run: Start-Sleep -s 400 + shell: powershell + + - name: Sleep until OSD server starts - non-windows + if: ${{ matrix.os != 'windows-latest' }} run: sleep 300 shell: bash diff --git a/cypress.json b/cypress.json index 56235296e..dfbe681fc 100644 --- a/cypress.json +++ b/cypress.json @@ -2,7 +2,6 @@ "viewportHeight": 900, "viewportWidth": 1440, "defaultCommandTimeout": 20000, - "retries": 1, "env": { "opensearch_url": "localhost:9200", "opensearch_dashboards": "http://localhost:5601",