From 18efe340fc28c92adb575ebd2176cb4caeaf3515 Mon Sep 17 00:00:00 2001 From: Nicolas Agustin Guevara Pihen <42900763+Tostti@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:15:42 -0300 Subject: [PATCH] Fix repository tests (#163) --- .github/workflows/build_and_test_workflow.yml | 76 +- .github/workflows/cypress_workflow.yml | 6 +- .../src/integration_tests/build.test.ts | 12 - .../public/application/components/home_app.js | 50 +- .../application/components/legacy/home.js | 7 +- .../__snapshots__/overview.test.tsx.snap | 761 ++---------------- 6 files changed, 157 insertions(+), 755 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index f434b39cf385..69689d019df2 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -6,12 +6,12 @@ name: Build and test # trigger on every commit push and PR for all branches except feature branches and pushes for backport branches on: push: - branches: [ '**', '!feature/**', '!backport/**' ] + branches: ['**', '!feature/**', '!backport/**'] paths-ignore: - '**/*.md' - 'docs/**' pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**', '!feature/**'] paths-ignore: - '**/*.md' - 'docs/**' @@ -25,7 +25,7 @@ env: TEST_OPENSEARCH_TRANSPORT_PORT: 9403 TEST_OPENSEARCH_PORT: 9400 OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true - NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first" + NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first' jobs: build-lint-test: @@ -33,13 +33,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] #Removed 'windows-latest' group: [1, 2, 3, 4] include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - name: Configure git's autocrlf (Windows only) @@ -53,7 +53,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -138,13 +138,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] #Removed 'windows-latest' group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - run: echo Running functional tests for ciGroup${{ matrix.group }} @@ -160,7 +160,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -233,12 +233,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] #Removed 'windows-latest' include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - run: echo Running plugin functional tests @@ -254,7 +254,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -332,21 +332,21 @@ jobs: ext: tar.gz suffix: linux-arm64 script: build-platform --linux-arm --skip-os-packages - - os: macos-latest - name: macOS x64 - ext: tar.gz - suffix: darwin-x64 - script: build-platform --darwin --skip-os-packages - - os: macos-latest - name: macOS ARM64 - ext: tar.gz - suffix: darwin-arm64 - script: build-platform --darwin-arm --skip-os-packages - - os: windows-latest - name: Windows x64 - ext: zip - suffix: windows-x64 - script: build-platform --windows --skip-os-packages + # - os: macos-latest + # name: macOS x64 + # ext: tar.gz + # suffix: darwin-x64 + # script: build-platform --darwin --skip-os-packages + # - os: macos-latest + # name: macOS ARM64 + # ext: tar.gz + # suffix: darwin-arm64 + # script: build-platform --darwin-arm --skip-os-packages + # - os: windows-latest + # name: Windows x64 + # ext: zip + # suffix: windows-x64 + # script: build-platform --windows --skip-os-packages runs-on: ${{ matrix.os }} defaults: run: @@ -364,7 +364,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -441,7 +441,19 @@ jobs: working-directory: ./artifacts strategy: matrix: - version: [osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0, osd-2.6.0, osd-2.7.0, osd-2.8.0, osd-2.9.0] + version: + [ + osd-2.0.0, + osd-2.1.0, + osd-2.2.0, + osd-2.3.0, + osd-2.4.0, + osd-2.5.0, + osd-2.6.0, + osd-2.7.0, + osd-2.8.0, + osd-2.9.0, + ] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/cypress_workflow.yml b/.github/workflows/cypress_workflow.yml index 4dc7206e2ce0..a0d4b4312f26 100644 --- a/.github/workflows/cypress_workflow.yml +++ b/.github/workflows/cypress_workflow.yml @@ -3,7 +3,7 @@ name: Run cypress tests # trigger on every PR for all branches except feature branches on: pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**', '!feature/**'] paths-ignore: - '**/*.md' workflow_dispatch: @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - group: [1, 2, 3, 4, 5, 6, 7, 8, 9] + group: [1, 2, 3, 4, 5] container: image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2 options: --user 1001 @@ -184,7 +184,7 @@ jobs: with: issue-number: ${{ inputs.pr_number }} comment-author: 'github-actions[bot]' - body-includes: "${{ env.COMMENT_TAG }}" + body-includes: '${{ env.COMMENT_TAG }}' - name: Add comment on the PR uses: peter-evans/create-or-update-comment@v3 diff --git a/packages/osd-plugin-helpers/src/integration_tests/build.test.ts b/packages/osd-plugin-helpers/src/integration_tests/build.test.ts index 37e5b3aacd98..780682d27658 100644 --- a/packages/osd-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/osd-plugin-helpers/src/integration_tests/build.test.ts @@ -101,15 +101,9 @@ it('builds a generated plugin into a viable archive', async () => { info running @osd/optimizer │ info initialized, 0 bundles cached │ info starting worker [1 bundle] - │ warn worker stderr Browserslist: caniuse-lite is outdated. Please run: - │ warn worker stderr npx update-browserslist-db@latest - │ warn worker stderr Why you should do it regularly: https://github.com/browserslist/update-db#readme │ succ 1 bundles compiled successfully after