From 418337de8cf5434ab8bbed50201734b4f7340273 Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Mon, 5 Aug 2024 11:07:48 -0700 Subject: [PATCH] remove workflows for test Signed-off-by: Junqiu Lei --- .github/workflows/changelog_verifier.yml | 18 --- .github/workflows/cypress-workflow.yml | 2 +- .github/workflows/unit-tests-workflow.yml | 115 ------------------ .../workflows/verify-binary-installation.yml | 55 --------- 4 files changed, 1 insertion(+), 189 deletions(-) delete mode 100644 .github/workflows/changelog_verifier.yml delete mode 100644 .github/workflows/unit-tests-workflow.yml delete mode 100644 .github/workflows/verify-binary-installation.yml diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml deleted file mode 100644 index 992a38b6..00000000 --- a/.github/workflows/changelog_verifier.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Changelog Verifier" -on: - pull_request: - types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled] - -jobs: - # Enforces the update of a changelog file on every pull request - verify-changelog: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: ${{ github.event.pull_request.head.sha }} - - - uses: dangoslen/changelog-enforcer@v3 - with: - skipLabels: "autocut, skip-changelog" diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 3023daa2..fd785c79 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -24,7 +24,7 @@ jobs: # This setting says that all jobs should finish, even if one fails fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest ] + os: [ ubuntu-latest ] include: - os: windows-latest working_directory: X:\ diff --git a/.github/workflows/unit-tests-workflow.yml b/.github/workflows/unit-tests-workflow.yml deleted file mode 100644 index 2f817b27..00000000 --- a/.github/workflows/unit-tests-workflow.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: Unit tests workflow -on: - push: - branches: - - main - - 2.* - pull_request: - branches: - - main - - 2.* - - feature/** - -env: - OPENSEARCH_DASHBOARDS_BRANCH: 'main' -jobs: - Get-CI-Image-Tag: - uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main - with: - product: opensearch-dashboards - - tests-linux: - needs: Get-CI-Image-Tag - name: Run unit tests - runs-on: ubuntu-latest - container: - # using the same image which is used by opensearch-build team to build the OpenSearch Distribution - # this image tag is subject to change as more dependencies and updates will arrive over time - image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} - # need to switch to root so that github actions can install runner binary on container without permission issues. - options: --user root - - steps: - - name: Checkout Plugin - uses: actions/checkout@v3 - with: - path: dashboards-maps - - - name: Checkout OpenSearch Dashboards - uses: actions/checkout@v3 - with: - repository: opensearch-project/OpenSearch-Dashboards - ref: ${{ env.OPENSEARCH_DASHBOARDS_BRANCH }} - path: OpenSearch-Dashboards - - - name: Move plugin to OpenSearch-Dashboard Plugins Directory - run: mv dashboards-maps OpenSearch-Dashboards/plugins/dashboards-maps - - - name: Bootstrap plugin - run: | - chown -R 1000:1000 `pwd` - cd ./OpenSearch-Dashboards/ - su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v && - cd ./plugins/dashboards-maps && - whoami && yarn osd bootstrap --single-version=loose && yarn run test:jest --coverage" - - - name: Uploads coverage - uses: codecov/codecov-action@v1 - - tests-windows-macos: - strategy: - matrix: - os: [ windows-latest, macos-latest ] - - name: Run unit tests - runs-on: ${{ matrix.os }} - steps: - - name: Checkout Plugin - uses: actions/checkout@v3 - with: - path: dashboards-maps - - # Enable longer filenames for windows - - name: Enable longer filenames - if: ${{ matrix.os == 'windows-latest' }} - run: git config --system core.longpaths true - - - name: Checkout OpenSearch Dashboards - uses: actions/checkout@v3 - with: - repository: opensearch-project/OpenSearch-Dashboards - ref: ${{ env.OPENSEARCH_DASHBOARDS_BRANCH }} - path: OpenSearch-Dashboards - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: './OpenSearch-Dashboards/.nvmrc' - registry-url: 'https://registry.npmjs.org' - - - name: Install Yarn - # Need to use bash to avoid having a windows/linux specific step - shell: bash - run: | - YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn") - echo "Installing yarn@$YARN_VERSION" - npm i -g yarn@$YARN_VERSION - - - run: node -v - - run: yarn -v - - - name: Move plugin to OpenSearch-Dashboard Plugins Directory - run: mv dashboards-maps OpenSearch-Dashboards/plugins/dashboards-maps - - - name: Bootstrap plugin - run: | - cd OpenSearch-Dashboards/plugins/dashboards-maps - yarn osd bootstrap --single-version=loose - - - name: Run tests with coverage - run: | - cd OpenSearch-Dashboards/plugins/dashboards-maps - yarn run test:jest --coverage - - - name: Uploads coverage - uses: codecov/codecov-action@v1 diff --git a/.github/workflows/verify-binary-installation.yml b/.github/workflows/verify-binary-installation.yml deleted file mode 100644 index 4bc2a864..00000000 --- a/.github/workflows/verify-binary-installation.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: 'Install Dashboards with Plugin via Binary' - -on: [push, pull_request] -env: - OPENSEARCH_VERSION: '3.0.0' - CI: 1 - # avoid warnings like "tput: No value for $TERM and no -T specified" - TERM: xterm - -jobs: - verify-binary-installation: - name: Run binary installation - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - # TODO: add windows support when OSD core is stable on windows - runs-on: ${{ matrix.os }} - steps: - - name: Checkout Branch - uses: actions/checkout@v3 - - - name: Set env - run: | - opensearch_version=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion") - plugin_version=$(node -p "require('./opensearch_dashboards.json').version") - echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV - echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV - shell: bash - - - name: Run Opensearch - uses: derek-ho/start-opensearch@v2 - with: - opensearch-version: ${{ env.OPENSEARCH_VERSION }} - security-enabled: false - - - name: Run Dashboards - id: setup-dashboards - uses: derek-ho/setup-opensearch-dashboards@v2 - with: - plugin_name: dashboards-maps - built_plugin_name: customImportMapDashboards - built_plugin_suffix: ${{ env.OPENSEARCH_VERSION }} - install_zip: true - - - name: Start the binary - run: | - nohup ./bin/opensearch-dashboards & - working-directory: ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }} - shell: bash - - - name: Health check - run: | - timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' - shell: bash \ No newline at end of file