From feb969609a2581a714f583444b8a400bb7c14fdf 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 - .../__snapshots__/overview.test.tsx.snap | 761 ++---------------- 4 files changed, 128 insertions(+), 727 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index efa86d7dc0fa..8d517ba0e490 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -6,14 +6,14 @@ 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/**' - '.lycheeignore' - 'changelogs/fragments/**' pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**', '!feature/**'] paths-ignore: - '**/*.md' - 'docs/**' @@ -29,7 +29,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: @@ -37,13 +37,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) @@ -57,7 +57,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -143,13 +143,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 }} @@ -165,7 +165,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -260,12 +260,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 @@ -281,7 +281,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -381,21 +381,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: @@ -413,7 +413,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -490,7 +490,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 959bbcbac925..9a5f423a36a0 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' - '.lycheeignore' @@ -50,7 +50,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 @@ -186,7 +186,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