From 03d7f63183165c3bb72f70fbaf6f8c05199880bb Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 1 Feb 2022 14:20:29 +0530 Subject: [PATCH 1/7] refactor: i18n changes (header/ spreadsheet menu options) Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../nc-gui/components/ProjectTreeView.vue | 4 +-- .../spreadsheet/components/columnFilter.vue | 8 +++-- .../components/columnFilterMenu.vue | 8 +++-- .../spreadsheet/components/fieldsMenu.vue | 14 ++++++--- .../spreadsheet/components/moreActions.vue | 9 ++++-- .../spreadsheet/components/shareViewMenu.vue | 3 +- .../spreadsheet/components/sortListMenu.vue | 6 ++-- packages/nc-gui/components/sponsorMini.vue | 10 +++--- packages/nc-gui/layouts/default.vue | 31 ++++++++++++------- 9 files changed, 61 insertions(+), 32 deletions(-) diff --git a/packages/nc-gui/components/ProjectTreeView.vue b/packages/nc-gui/components/ProjectTreeView.vue index f0ca6bc702..0bbb76b605 100644 --- a/packages/nc-gui/components/ProjectTreeView.vue +++ b/packages/nc-gui/components/ProjectTreeView.vue @@ -162,7 +162,7 @@ --> - Loading mdi-spin mdi-loading + + {{ $t('general.loading') }} mdi-spin mdi-loading mdi-account-supervisor-outline - Share + + {{ $t('activity.share') }} @@ -236,7 +239,9 @@

- {{ $vuetify.theme.dark ? 'It does come in Black (^⇧B)' : 'Does it come in Black ? (^⇧B)' }} + + {{ $vuetify.theme.dark ? $t('tooltip.theme.dark') : $t('tooltip.theme.light') }}

@@ -339,17 +344,19 @@ + + mdi-content-copy   - Copy auth token + {{ $t('activity.account.authToken') }} @@ -374,7 +381,7 @@ {{ isGql ? 'mdi-graphql' : 'mdi-code-json' }}   - {{ isGql ? 'GraphQL APIs' : 'Swagger APIs Doc' }} + {{ isGql ? 'GraphQL APIs' : 'Swagger APIs' }} @@ -382,7 +389,7 @@ mdi-information-outline -   Copy Project info +   {{ $t('activity.account.projInfo') }} @@ -391,7 +398,7 @@ mdi-palette   - Themes + {{ $t('activity.account.themes') }} @@ -401,7 +408,7 @@ mdi-logout -   Sign Out +   {{ $t('general.signOut') }} @@ -422,14 +429,14 @@ mdi-account-plus-outline   Sign Up + >{{ $t('general.signUp') }} mdi-login -   Login +   {{ $t('general.signIn') }} From 307ba66a4cb4023c9cded56882c3d5079b5904b6 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 7 Feb 2022 20:10:25 +0530 Subject: [PATCH 2/7] chore: i18n grid view translation updates Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../nc-gui/components/ProjectTreeView.vue | 2 +- .../spreadsheet/components/columnFilter.vue | 6 ++--- .../spreadsheet/components/fieldsMenu.vue | 2 +- .../spreadsheet/components/sortListMenu.vue | 4 ++-- .../project/spreadsheet/rowsXcDataTable.vue | 24 ++++++++++++++----- .../project/spreadsheet/views/xcGridView.vue | 4 +++- .../project/tableTabs/columnsMock.vue | 2 +- .../project/tableTabs/constraints.vue | 2 +- .../components/project/tableTabs/indexes.vue | 2 +- .../project/tableTabs/relations.vue | 2 +- .../components/project/tableTabs/triggers.vue | 4 ++-- packages/nc-gui/components/projectTabs.vue | 3 ++- .../nc-gui/components/templates/editor.vue | 5 +++- packages/nc-gui/lang/en.json | 3 ++- 14 files changed, 42 insertions(+), 23 deletions(-) diff --git a/packages/nc-gui/components/ProjectTreeView.vue b/packages/nc-gui/components/ProjectTreeView.vue index 0bbb76b605..d207a8b22d 100644 --- a/packages/nc-gui/components/ProjectTreeView.vue +++ b/packages/nc-gui/components/ProjectTreeView.vue @@ -32,7 +32,7 @@ diff --git a/packages/nc-gui/components/project/spreadsheet/components/sortListMenu.vue b/packages/nc-gui/components/project/spreadsheet/components/sortListMenu.vue index 38e44f6357..22ca85db5b 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/sortListMenu.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/sortListMenu.vue @@ -39,7 +39,7 @@ v-model="sort.field" class="caption nc-sort-field-select" :items="fieldList" - label="Field" + :label="$t('objects.field')" solo flat dense @@ -55,7 +55,7 @@ v-model="sort.order" class="flex-shrink-1 flex-grow-0 caption nc-sort-dir-select" :items="[{text : 'A -> Z', value: ''},{text : 'Z -> A', value: '-'}]" - label="Operation" + :label="$t('labels.operation')" solo flat dense diff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue index 160995f137..06d697795f 100644 --- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue +++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue @@ -50,7 +50,7 @@ dense solo hide-details - :placeholder="searchField ? `Search '${searchField}' column` : 'Search all columns'" + :placeholder="searchField ? $t('placeholder.searchColumn', {searchField}) : 'Search all columns'" class="elevation-0 pa-0 flex-grow-1 caption search-field" @keyup.enter="searchQuery = searchQueryVal" @blur="searchQuery = searchQueryVal" @@ -138,6 +138,7 @@ mdi-circle-small + + + mdi-delete-outline @@ -524,13 +527,22 @@ v-if="relationType !== 'bt'" @click="insertNewRow(false)" > - Insert New Row + + + {{ $t('activity.insertRow') }} + - Delete Row + + + {{ $t('activity.deleteRow') }} + - Delete Selected Rows + + + {{ $t('activity.deleteSelectedRow') }} + Add new row diff --git a/packages/nc-gui/components/project/tableTabs/columnsMock.vue b/packages/nc-gui/components/project/tableTabs/columnsMock.vue index b58766e51d..0884141d19 100644 --- a/packages/nc-gui/components/project/tableTabs/columnsMock.vue +++ b/packages/nc-gui/components/project/tableTabs/columnsMock.vue @@ -69,7 +69,7 @@ class="error text-right" @click="deleteTable('showDialog')" > - Delete Table   + {{ $t('activity.deleteTable') }}   - Delete Table + {{ $t('activity.deleteTable') }} - Delete Table + {{ $t('activity.deleteTable') }} error diff --git a/packages/nc-gui/components/project/tableTabs/triggers.vue b/packages/nc-gui/components/project/tableTabs/triggers.vue index 966b89e821..c09b8cbd36 100644 --- a/packages/nc-gui/components/project/tableTabs/triggers.vue +++ b/packages/nc-gui/components/project/tableTabs/triggers.vue @@ -65,14 +65,14 @@ - Delete Table + {{ $t('activity.deleteTable') }} diff --git a/packages/nc-gui/components/projectTabs.vue b/packages/nc-gui/components/projectTabs.vue index 6d07c23c28..3e73d8fd87 100644 --- a/packages/nc-gui/components/projectTabs.vue +++ b/packages/nc-gui/components/projectTabs.vue @@ -253,9 +253,10 @@ + mdi-plus - Add new table + + + {{ $t('tooltip.addTable') }} + diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 8d0b4fe2b1..b35bae9ad3 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -260,6 +260,7 @@ "createTable": "Table Create", "refreshTable": "Tables Refresh", "renameTable": "Table Rename", + "deleteTable": "Table Delete", "addField": "Add new field to this table", "setPrimary": "Set as Primary value", "addRow": "Add new row", @@ -344,7 +345,7 @@ }, "searchProjectTree": "Search tables", "searchFields": "Search fields", - "searchColumn": "Search {search} column", + "searchColumn": "Search {searchField} column", "searchApps": "Search apps", "searchModels": "Search models", "noItemsFound": "No items found", From 1d75c79224603a4cb37f83b12f9026081d3c936f Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 8 Feb 2022 11:33:18 +0800 Subject: [PATCH 3/7] chore: remove NODE_OPTIONS=--openssl-legacy-provider Signed-off-by: Wing-Kam Wong --- packages/nc-gui/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/package.json b/packages/nc-gui/package.json index 4438d7e546..8a7db9a0b9 100644 --- a/packages/nc-gui/package.json +++ b/packages/nc-gui/package.json @@ -2,7 +2,7 @@ "name": "nc-gui", "version": "0.11.35", "scripts": { - "dev": "NODE_OPTIONS=--openssl-legacy-provider EE=true nuxt", + "dev": "EE=true nuxt", "build": "EE=true nuxt build", "lint": "eslint . --ext .js,.vue --fix --quiet", "start": "EE=true nuxt start", From 5b94183e1104d6fb8c98dc28fe324644499ed67b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 8 Feb 2022 13:47:16 +0530 Subject: [PATCH 4/7] test: cy screenshot experiment over ci-cd Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 96 +++++++++++++++++++ .../common/6d_language_validation.js | 3 + 2 files changed, 99 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5180602f72..0181ade419 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -44,6 +44,12 @@ jobs: ${{ runner.os }}- - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -82,6 +88,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -120,6 +132,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -158,6 +176,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -195,6 +219,12 @@ jobs: ${{ runner.os }}- - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -233,6 +263,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -271,6 +307,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -309,6 +351,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -347,6 +395,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -385,6 +439,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -423,6 +483,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -461,6 +527,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -499,6 +571,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -537,6 +615,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -575,6 +659,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: @@ -613,6 +703,12 @@ jobs: - name: Set env run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Upload screenshots + uses: actions/upload-artifact@latest + if: failure() + with: + name: cypress-snapshots + path: cypress/snapshots - name: Cypress run uses: cypress-io/github-action@v2 with: diff --git a/scripts/cypress/integration/common/6d_language_validation.js b/scripts/cypress/integration/common/6d_language_validation.js index 9fd4d751f1..44a99a1802 100644 --- a/scripts/cypress/integration/common/6d_language_validation.js +++ b/scripts/cypress/integration/common/6d_language_validation.js @@ -9,6 +9,7 @@ export const genTest = (type, xcdb) => { before(() => { //loginPage.signIn(roles.owner.credentials) mainPage.toolBarTopLeft(mainPage.HOME).click(); + cy.screenshot("6d-1"); }); const langVerification = (idx, lang) => { @@ -20,6 +21,8 @@ export const genTest = (type, xcdb) => { cy.get(".nc-menu-translate").click(); cy.getActiveMenu().find(".v-list-item").eq(idx).click(); + cy.screenshot("6d-2"); + // basic validations // 1. Page title: "My Projects" // 2. Button: "New Project" From 013eef9053231939229c860f2e6db3a266392092 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 8 Feb 2022 13:58:42 +0530 Subject: [PATCH 5/7] test/cypress: disable ci-cd screenshot upload Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 1391 ++++++++--------- .../integration/common/6b_downloadCsv.js | 1 + 2 files changed, 649 insertions(+), 743 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0181ade419..3675843581 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -3,751 +3,656 @@ name: "CI/CD" on: - push: - paths: - - "packages/nc-gui/**" - - "scripts/cypress/**" - - "packages/nocodb/**" - - ".github/workflows/ci-cd.yml" - pull_request: - branches: [master, develop] - paths: - - "packages/nc-gui/**" - - "scripts/cypress/**" - - "packages/nocodb/**" - - ".github/workflows/ci-cd.yml" + push: + branches: [master, cypress] + paths: + - "packages/nc-gui/**" + - "scripts/cypress/**" + - "packages/nocodb/**" + - ".github/workflows/ci-cd.yml" + pull_request: + branches: [master] + paths: + - "packages/nc-gui/**" + - "scripts/cypress/**" + - "packages/nocodb/**" + - ".github/workflows/ci-cd.yml" jobs: - cypress-restTableOps-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restTableOps.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-restViews-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restViews.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-restRoles-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restRoles.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-restMisc-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-restTableOps-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restTableOps.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-restViews-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restViews.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-restRoles-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restRoles.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-restMisc-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-gqlTableOps-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/gqlTableOps.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-gqlViews-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/gqlViews.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-gqlRoles-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/gqlRoles.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-gqlMisc-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/gqlMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-gqlTableOps-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-gqlTableOps.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-gqlViews-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-gqlViews.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-gqlRoles-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-gqlRoles.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - cypress-xcdb-gqlMisc-run: - runs-on: ubuntu-20.04 - steps: - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set env - run: echo "NODE_ENV=test" >> $GITHUB_ENV - - name: Upload screenshots - uses: actions/upload-artifact@latest - if: failure() - with: - name: cypress-snapshots - path: cypress/snapshots - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - start: | - npm run start:xcdb-api - npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-gqlMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" - wait-on-timeout: 1200 - config-file: scripts/cypress/cypress.json - docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check for update - run: | - echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nocodb) = nocodb ]] && echo 'OK')" >> $GITHUB_ENV - - - name: Test Mysql REST APIs - if: ${{ env.CHANGED == 'OK' }} - run: cd ./packages/nocodb/ && docker-compose run xc-test-mysql - - name: Test Mysql GraphQL APIs - if: ${{ env.CHANGED == 'OK' }} - run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mysql - - # - name: Test MSSQL REST APIs - # run: cd ./packages/nocodb/ && docker-compose run xc-test-mssql - # - name: Test MSSQL GraphQL APIs - # run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mssql - # - - name: Test PostgreSQL REST APIs - if: ${{ env.CHANGED == 'OK' }} - run: cd ./packages/nocodb/ && docker-compose run xc-test-pg - - name: Test PostgreSQL GraphQL APIs - if: ${{ env.CHANGED == 'OK' }} - run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-pg + cypress-restTableOps-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-restViews-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-restRoles-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-restMisc-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-restTableOps-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-restViews-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-restViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-restRoles-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-restRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-restMisc-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-restMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-gqlTableOps-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/gqlTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-gqlViews-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/gqlViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-gqlRoles-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/gqlRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-gqlMisc-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/gqlMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-gqlTableOps-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-gqlTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-gqlViews-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-gqlViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-gqlRoles-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-gqlRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + cypress-xcdb-gqlMisc-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:xcdb-api + npm run start:web + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-gqlMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check for update + run: | + echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nocodb) = nocodb ]] && echo 'OK')" >> $GITHUB_ENV + + - name: Test Mysql REST APIs + if: ${{ env.CHANGED == 'OK' }} + run: cd ./packages/nocodb/ && docker-compose run xc-test-mysql + - name: Test Mysql GraphQL APIs + if: ${{ env.CHANGED == 'OK' }} + run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mysql + + # - name: Test MSSQL REST APIs + # run: cd ./packages/nocodb/ && docker-compose run xc-test-mssql + # - name: Test MSSQL GraphQL APIs + # run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-mssql + # + - name: Test PostgreSQL REST APIs + if: ${{ env.CHANGED == 'OK' }} + run: cd ./packages/nocodb/ && docker-compose run xc-test-pg + - name: Test PostgreSQL GraphQL APIs + if: ${{ env.CHANGED == 'OK' }} + run: cd ./packages/nocodb/ && docker-compose run xc-test-gql-pg # # - name: Test SQLite3 REST APIs # run: cd ./packages/nocodb/ && docker-compose run xc-test-sqlite diff --git a/scripts/cypress/integration/common/6b_downloadCsv.js b/scripts/cypress/integration/common/6b_downloadCsv.js index af6dc6faef..2d224cb2f8 100644 --- a/scripts/cypress/integration/common/6b_downloadCsv.js +++ b/scripts/cypress/integration/common/6b_downloadCsv.js @@ -13,6 +13,7 @@ export const genTest = (type, xcdb) => { after(() => { cy.closeTableTab("Country"); + cy.screenshot('6b-after') }); it("Download verification- base view, default columns", () => { From 69e34af10e8f4675b79eb713c6a5d95085e6d182 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:08:10 +0530 Subject: [PATCH 6/7] test/cypress: ci-cd corrections Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 3 +-- scripts/cypress/integration/common/6b_downloadCsv.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 3675843581..375d5a03cb 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,14 +4,13 @@ name: "CI/CD" on: push: - branches: [master, cypress] paths: - "packages/nc-gui/**" - "scripts/cypress/**" - "packages/nocodb/**" - ".github/workflows/ci-cd.yml" pull_request: - branches: [master] + branches: [master, develop] paths: - "packages/nc-gui/**" - "scripts/cypress/**" diff --git a/scripts/cypress/integration/common/6b_downloadCsv.js b/scripts/cypress/integration/common/6b_downloadCsv.js index 2d224cb2f8..a8f0eec552 100644 --- a/scripts/cypress/integration/common/6b_downloadCsv.js +++ b/scripts/cypress/integration/common/6b_downloadCsv.js @@ -9,6 +9,7 @@ export const genTest = (type, xcdb) => { before(() => { // loginPage.loginAndOpenProject(type) cy.openTableTab("Country", 25); + cy.screenshot("6b-before"); }); after(() => { From 4456d28099163d2299a3da7e4f6ed0ed24d82599 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 8 Feb 2022 18:35:41 +0530 Subject: [PATCH 7/7] chore: enable ci-cd cypress screenshots --- .github/workflows/ci-cd.yml | 96 +++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 375d5a03cb..1f6f5b6c21 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -55,6 +55,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-restViews-run: runs-on: ubuntu-20.04 steps: @@ -93,6 +99,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restViews-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-restRoles-run: runs-on: ubuntu-20.04 steps: @@ -131,6 +143,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restRoles-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-restMisc-run: runs-on: ubuntu-20.04 steps: @@ -169,6 +187,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restMisc-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-restTableOps-run: runs-on: ubuntu-20.04 steps: @@ -206,6 +230,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-restViews-run: runs-on: ubuntu-20.04 steps: @@ -244,6 +274,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-restViews-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-restRoles-run: runs-on: ubuntu-20.04 steps: @@ -282,6 +318,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-restRoles-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-restMisc-run: runs-on: ubuntu-20.04 steps: @@ -320,6 +362,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-restMisc-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-gqlTableOps-run: runs-on: ubuntu-20.04 steps: @@ -358,6 +406,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: gqlTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-gqlViews-run: runs-on: ubuntu-20.04 steps: @@ -396,6 +450,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: gqlViews-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-gqlRoles-run: runs-on: ubuntu-20.04 steps: @@ -434,6 +494,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: gqlRoles-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-gqlMisc-run: runs-on: ubuntu-20.04 steps: @@ -472,6 +538,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: gqlMisc-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-gqlTableOps-run: runs-on: ubuntu-20.04 steps: @@ -510,6 +582,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-gqlTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-gqlViews-run: runs-on: ubuntu-20.04 steps: @@ -548,6 +626,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-gqlViews-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-gqlRoles-run: runs-on: ubuntu-20.04 steps: @@ -586,6 +670,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-gqlRoles-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-xcdb-gqlMisc-run: runs-on: ubuntu-20.04 steps: @@ -624,6 +714,12 @@ jobs: wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: xcdb-gqlMisc-snapshots + path: scripts/cypress/screenshots + retention-days: 2 docker: runs-on: ubuntu-latest steps: