From 277ef6b57d728d0da0ca333e9dd1ded1c7c9dca4 Mon Sep 17 00:00:00 2001 From: Preet Shah <48907607+preetsshah@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:04:19 +0530 Subject: [PATCH] Update cypress workflows (#14513) * Update helm-values documentation for v1.2.4 * Update Cypress CI workflows * Remove projectId from cypress.config.ts * Update Cypress workflows to use output variables * Update step ID * Update Cypress CI workflows' Project condition --- .../workflows/cypress-integration-tests-mysql-skip.yml | 2 -- .github/workflows/cypress-integration-tests-mysql.yml | 10 ++++++++++ .../cypress-integration-tests-postgresql-skip.yml | 2 -- .../workflows/cypress-integration-tests-postgresql.yml | 10 ++++++++++ .../src/main/resources/ui/cypress.config.ts | 1 - 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress-integration-tests-mysql-skip.yml b/.github/workflows/cypress-integration-tests-mysql-skip.yml index f294db561699..5a783f3e41b6 100644 --- a/.github/workflows/cypress-integration-tests-mysql-skip.yml +++ b/.github/workflows/cypress-integration-tests-mysql-skip.yml @@ -12,8 +12,6 @@ name: MySQL Cypress Integration Tests on: - schedule: - - cron: '30 0 * * *' pull_request_target: types: - labeled diff --git a/.github/workflows/cypress-integration-tests-mysql.yml b/.github/workflows/cypress-integration-tests-mysql.yml index 1b2ee0939799..e4a5a441293d 100644 --- a/.github/workflows/cypress-integration-tests-mysql.yml +++ b/.github/workflows/cypress-integration-tests-mysql.yml @@ -50,6 +50,15 @@ jobs: parallel-machine: [1, 2, 3, 4] environment: test steps: + - name: Set Project ID Environment variable + id: cypress-project-id + run: | + if [ "${{ github.event_name }}" == "schedule" ]; then + echo "PROJECT_ID=${{ secrets.CYPRESS_SCHEDULE_PROJECT_ID }}" >> $GITHUB_OUTPUT + else + echo "PROJECT_ID=${{ secrets.CYPRESS_PR_PROJECT_ID }}" >> $GITHUB_OUTPUT + fi + - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -144,6 +153,7 @@ jobs: CYPRESS_SNOWFLAKE_ACCOUNT: ${{ secrets.TEST_SNOWFLAKE_ACCOUNT }} CYPRESS_SNOWFLAKE_DATABASE: ${{ secrets.TEST_SNOWFLAKE_DATABASE }} CYPRESS_SNOWFLAKE_WAREHOUSE: ${{ secrets.TEST_SNOWFLAKE_WAREHOUSE }} + CYPRESS_PROJECT_ID: ${{ steps.cypress-project-id.outputs.PROJECT_ID }} CYPRESS_BQ_PRIVATE_KEY: ${{ secrets.TEST_BQ_PRIVATE_KEY }} CYPRESS_BQ_PROJECT_ID: ${{ secrets.TEST_BQ_PROJECT_ID }} CYPRESS_BQ_PROJECT_ID_TAXONOMY: ${{ secrets.TEST_BQ_PROJECT_ID_TAXONOMY }} diff --git a/.github/workflows/cypress-integration-tests-postgresql-skip.yml b/.github/workflows/cypress-integration-tests-postgresql-skip.yml index 75ae1776fa10..643d2c3748b6 100644 --- a/.github/workflows/cypress-integration-tests-postgresql-skip.yml +++ b/.github/workflows/cypress-integration-tests-postgresql-skip.yml @@ -12,8 +12,6 @@ name: PostgreSQL Cypress Integration Tests on: - schedule: - - cron: '30 0 * * *' pull_request_target: types: - labeled diff --git a/.github/workflows/cypress-integration-tests-postgresql.yml b/.github/workflows/cypress-integration-tests-postgresql.yml index 11f39e55b94f..16deba43f2cc 100644 --- a/.github/workflows/cypress-integration-tests-postgresql.yml +++ b/.github/workflows/cypress-integration-tests-postgresql.yml @@ -50,6 +50,15 @@ jobs: parallel-machine: [1, 2, 3, 4] environment: test steps: + - name: Set Project ID Environment variable + id: cypress-project-id + run: | + if [ "${{ github.event_name }}" == "schedule" ]; then + echo "PROJECT_ID=${{ secrets.CYPRESS_SCHEDULE_PROJECT_ID }}" >> $GITHUB_OUTPUT + else + echo "PROJECT_ID=${{ secrets.CYPRESS_PR_PROJECT_ID }}" >> $GITHUB_OUTPUT + fi + - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -144,6 +153,7 @@ jobs: CYPRESS_SNOWFLAKE_ACCOUNT: ${{ secrets.TEST_SNOWFLAKE_ACCOUNT }} CYPRESS_SNOWFLAKE_DATABASE: ${{ secrets.TEST_SNOWFLAKE_DATABASE }} CYPRESS_SNOWFLAKE_WAREHOUSE: ${{ secrets.TEST_SNOWFLAKE_WAREHOUSE }} + CYPRESS_PROJECT_ID: ${{ steps.cypress-project-id.outputs.PROJECT_ID }} CYPRESS_BQ_PRIVATE_KEY: ${{ secrets.TEST_BQ_PRIVATE_KEY }} CYPRESS_BQ_PROJECT_ID: ${{ secrets.TEST_BQ_PROJECT_ID }} CYPRESS_BQ_PRIVATE_KEY_ID: ${{ secrets.TEST_BQ_PRIVATE_KEY_ID }} diff --git a/openmetadata-ui/src/main/resources/ui/cypress.config.ts b/openmetadata-ui/src/main/resources/ui/cypress.config.ts index 2ec11180abe3..f84c707959b0 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress.config.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress.config.ts @@ -14,7 +14,6 @@ import { defineConfig } from 'cypress'; import plugins from './cypress/plugins/index.js'; export default defineConfig({ - projectId: 'a9yxci', viewportWidth: 1240, viewportHeight: 660, watchForFileChanges: false,