From e4750e4663a2f6b6276a3bd1a42b40ce11a78ad3 Mon Sep 17 00:00:00 2001 From: mcasimir Date: Wed, 2 Mar 2022 16:13:14 +0100 Subject: [PATCH 1/3] chore: remove moved jobs --- .github/workflows/check-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 240b6bb85d0..bace1ed1c2c 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [macos-latest] fail-fast: false From 3efa187c78034251cbc6023c36d8d3295c9b948e Mon Sep 17 00:00:00 2001 From: mcasimir Date: Wed, 2 Mar 2022 18:54:49 +0100 Subject: [PATCH 2/3] remove all the github tests --- .github/workflows/build.yaml | 117 ---------------------- .github/workflows/check-test.yaml | 90 ----------------- .github/workflows/connectivity-tests.yaml | 2 +- 3 files changed, 1 insertion(+), 208 deletions(-) delete mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/check-test.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 4083ab4b815..00000000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# This action runs lint checks and tests against the code. -name: Build Compass - -# Controls when the action will run. -on: - pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - build: - name: Build Compass - - timeout-minutes: 45 - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - fail-fast: false - - # The type of runner that the job will run on - runs-on: ${{ matrix.os }} - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Install Deps Ubuntu - if: ${{ runner.os == 'Linux' }} - run: sudo apt-get -y install libkrb5-dev libsecret-1-dev net-tools libstdc++6 gnome-keyring - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout - uses: actions/checkout@v2 - - # So we are not in a detached HEAD state and have a user ready, so that - # lerna can commit later on - - name: Prepare Git - run: | - git switch -c "compass-build-workflow" - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - - - name: Setup Node.js Environment - uses: actions/setup-node@v2 - with: - # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 - node-version: ^14.17.5 - cache: 'npm' - - - name: Install npm@8.3.1 - run: | - npm install -g npm@8.3.1 - - - name: Run node-gyp bug workaround script - run: | - bash .evergreen/node-gyp-bug-workaround.sh - - - name: Install Dependencies - run: | - npm -v - npm ci - # We don't need to bootstrap anything else before running the e2e tests - npx lerna run bootstrap -- --stream --scope @mongodb/webpack-config-compass - - # https://github.community/t/set-path-for-wix-toolset-in-windows-runner/154708/3 - - name: Set path for candle.exe and light.exe - if: ${{ runner.os == 'Windows' }} - run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH - shell: bash - - - name: Build Compass - env: - DEBUG: 'hadron*,mongo*,electron*' - run: npm run package-compass - - - name: Test Packaged Application - env: - E2E_TESTS_METRICS_URI: ${{ secrets.E2E_TESTS_METRICS_URI }} - E2E_TESTS_ATLAS_HOST: ${{ secrets.E2E_TESTS_ATLAS_HOST }} - E2E_TESTS_DATA_LAKE_HOST: ${{ secrets.E2E_TESTS_DATA_LAKE_HOST }} - E2E_TESTS_ANALYTICS_NODE_HOST: ${{ secrets.E2E_TESTS_ANALYTICS_NODE_HOST }} - E2E_TESTS_SERVERLESS_HOST: ${{ secrets.E2E_TESTS_SERVERLESS_HOST }} - E2E_TESTS_FREE_TIER_HOST: ${{ secrets.E2E_TESTS_FREE_TIER_HOST }} - E2E_TESTS_ATLAS_USERNAME: ${{ secrets.E2E_TESTS_ATLAS_USERNAME }} - E2E_TESTS_ATLAS_PASSWORD: ${{ secrets.E2E_TESTS_ATLAS_PASSWORD }} - E2E_TESTS_ATLAS_X509_PEM: ${{ secrets.E2E_TESTS_ATLAS_X509_PEM }} - # Matches what we are doing in Evergreen - MONGODB_VERSION: '4' - DEBUG: 'compass-e2e-tests*,hadron*' - run: npm run test-packaged-ci --workspace compass-e2e-tests - - - name: Upload Compass Artifacts - uses: actions/upload-artifact@v2 - # In case e2e tests failed, but assets were produced, we still want to - # upload them for inspection - if: always() - with: - name: Compass Build ${{ runner.os }} - path: | - packages/compass/dist/*.dmg - packages/compass/dist/*.zip - packages/compass/dist/*.exe - packages/compass/dist/*.msi - packages/compass/dist/*.deb - packages/compass/dist/*.rpm - packages/compass/dist/*.tar.gz - packages/compass/dist/*.json - - - name: Upload Webdriverio Logs - uses: actions/upload-artifact@v2 - # even if tests succeeded you might still want to examine logs - if: always() - with: - name: Webdriverio Debug Files ${{ github.workflow }} ${{ runner.os }} - path: packages/compass-e2e-tests/.log/**/* diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml deleted file mode 100644 index bace1ed1c2c..00000000000 --- a/.github/workflows/check-test.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# This action runs lint checks and tests against the code. -name: Check and Test - -# Controls when the action will run. -on: - pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -env: - MAIN_BRANCH_NAME: remotes/origin/main - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - check-and-test: - name: Check and Test - - timeout-minutes: 60 - - strategy: - matrix: - os: [macos-latest] - - fail-fast: false - - # The type of runner that the job will run on - runs-on: ${{ matrix.os }} - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Install Deps Ubuntu - if: ${{ runner.os == 'Linux' }} - run: sudo apt-get -y install libkrb5-dev libsecret-1-dev net-tools libstdc++6 gnome-keyring - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup Node.js Environment - uses: actions/setup-node@v2 - with: - # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 - node-version: ^14.17.5 - cache: 'npm' - - - name: Install npm@8.3.1 - run: | - npm install -g npm@8.3.1 - - - name: Run node-gyp bug workaround script - run: | - bash .evergreen/node-gyp-bug-workaround.sh - - - name: Install Dependencies - run: | - npm -v - npm ci - # Dependencies are included when installing as npm workspaces will - # hoist every package in the repo and it's important that the - # dependencies of packages we are planning to test are also prepared - npx lerna run bootstrap --stream --since $MAIN_BRANCH_NAME --include-dependencies - shell: bash - - - name: Run Checks - # We exclude dependents when running eslint and depchecks because - # linting and dependency checking is relevant only for packages where - # the source code was changed - run: npm run check-ci -- --stream --since $MAIN_BRANCH_NAME --exclude-dependents - shell: bash - - - name: Run Tests - env: - E2E_TESTS_ATLAS_HOST: ${{ secrets.E2E_TESTS_ATLAS_HOST }} - E2E_TESTS_DATA_LAKE_HOST: ${{ secrets.E2E_TESTS_DATA_LAKE_HOST }} - E2E_TESTS_ANALYTICS_NODE_HOST: ${{ secrets.E2E_TESTS_ANALYTICS_NODE_HOST }} - E2E_TESTS_SERVERLESS_HOST: ${{ secrets.E2E_TESTS_SERVERLESS_HOST }} - E2E_TESTS_FREE_TIER_HOST: ${{ secrets.E2E_TESTS_FREE_TIER_HOST }} - E2E_TESTS_ATLAS_USERNAME: ${{ secrets.E2E_TESTS_ATLAS_USERNAME }} - E2E_TESTS_ATLAS_PASSWORD: ${{ secrets.E2E_TESTS_ATLAS_PASSWORD }} - E2E_TESTS_ATLAS_X509_PEM: ${{ secrets.E2E_TESTS_ATLAS_X509_PEM }} - # Matches what we are doing in Evergreen - MONGODB_VERSION: '4' - # compass-e2e-tests are ignored as we are already running tests against - # a packaged application in a separate workflow, so running them here - # slows down things while testing the same thing - run: npm run test-ci -- --stream --since $MAIN_BRANCH_NAME --ignore compass-e2e-tests - shell: bash diff --git a/.github/workflows/connectivity-tests.yaml b/.github/workflows/connectivity-tests.yaml index 1d9c3acc756..50aa93123b6 100644 --- a/.github/workflows/connectivity-tests.yaml +++ b/.github/workflows/connectivity-tests.yaml @@ -110,5 +110,5 @@ jobs: E2E_TESTS_ATLAS_X509_PEM: ${{ secrets.E2E_TESTS_ATLAS_X509_PEM }} # Matches what we are doing in Evergreen MONGODB_VERSION: '4' - run: COMPASS_RUN_DOCKER_TESTS=true npm run test --workspace mongodb-data-service + run: COMPASS_RUN_DOCKER_TESTS=true npm run test-connectivity --workspace mongodb-data-service shell: bash From 9a820a9ce5c3872c8afdceac14312ae7c71f93ca Mon Sep 17 00:00:00 2001 From: mcasimir Date: Thu, 3 Mar 2022 10:48:15 +0100 Subject: [PATCH 3/3] re-add e2e tests for OSX --- .github/workflows/e2e-tests-osx.yaml | 108 +++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .github/workflows/e2e-tests-osx.yaml diff --git a/.github/workflows/e2e-tests-osx.yaml b/.github/workflows/e2e-tests-osx.yaml new file mode 100644 index 00000000000..aada8b3c3ff --- /dev/null +++ b/.github/workflows/e2e-tests-osx.yaml @@ -0,0 +1,108 @@ +# Run e2e tests on osx since in EVG are currently disabled due +# to issues with unlocking keytar. +name: E2e Tests OSX + +on: + pull_request: + workflow_dispatch: + push: + branches: + - main + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build-and-test: + name: Package and Run E2e Tests on OSX + + timeout-minutes: 45 + + strategy: + matrix: + os: [macos-latest] + + fail-fast: false + + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout + uses: actions/checkout@v2 + + # So we are not in a detached HEAD state and have a user ready, so that + # lerna can commit later on + - name: Prepare Git + run: | + git switch -c "compass-build-workflow" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + + - name: Setup Node.js Environment + uses: actions/setup-node@v2 + with: + # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 + node-version: ^14.17.5 + cache: 'npm' + + - name: Install npm@8.3.1 + run: | + npm install -g npm@8.3.1 + + - name: Run node-gyp bug workaround script + run: | + bash .evergreen/node-gyp-bug-workaround.sh + + - name: Install Dependencies + run: | + npm -v + npm ci + # We don't need to bootstrap anything else before running the e2e tests + npx lerna run bootstrap -- --stream --scope @mongodb/webpack-config-compass + + - name: Build Compass + env: + DEBUG: 'hadron*,mongo*,electron*' + run: npm run package-compass + + - name: Test Packaged Application + env: + E2E_TESTS_METRICS_URI: ${{ secrets.E2E_TESTS_METRICS_URI }} + E2E_TESTS_ATLAS_HOST: ${{ secrets.E2E_TESTS_ATLAS_HOST }} + E2E_TESTS_DATA_LAKE_HOST: ${{ secrets.E2E_TESTS_DATA_LAKE_HOST }} + E2E_TESTS_ANALYTICS_NODE_HOST: ${{ secrets.E2E_TESTS_ANALYTICS_NODE_HOST }} + E2E_TESTS_SERVERLESS_HOST: ${{ secrets.E2E_TESTS_SERVERLESS_HOST }} + E2E_TESTS_FREE_TIER_HOST: ${{ secrets.E2E_TESTS_FREE_TIER_HOST }} + E2E_TESTS_ATLAS_USERNAME: ${{ secrets.E2E_TESTS_ATLAS_USERNAME }} + E2E_TESTS_ATLAS_PASSWORD: ${{ secrets.E2E_TESTS_ATLAS_PASSWORD }} + E2E_TESTS_ATLAS_X509_PEM: ${{ secrets.E2E_TESTS_ATLAS_X509_PEM }} + # Matches what we are doing in Evergreen + MONGODB_VERSION: '4' + DEBUG: 'compass-e2e-tests*,hadron*' + run: npm run test-packaged-ci --workspace compass-e2e-tests + + - name: Upload Compass Artifacts + uses: actions/upload-artifact@v2 + # In case e2e tests failed, but assets were produced, we still want to + # upload them for inspection + if: always() + with: + name: Compass Build ${{ runner.os }} + path: | + packages/compass/dist/*.dmg + packages/compass/dist/*.zip + packages/compass/dist/*.exe + packages/compass/dist/*.msi + packages/compass/dist/*.deb + packages/compass/dist/*.rpm + packages/compass/dist/*.tar.gz + packages/compass/dist/*.json + + - name: Upload Webdriverio Logs + uses: actions/upload-artifact@v2 + # even if tests succeeded you might still want to examine logs + if: always() + with: + name: Webdriverio Debug Files ${{ github.workflow }} ${{ runner.os }} + path: packages/compass-e2e-tests/.log/**/* \ No newline at end of file