From 2518e4824c5aa05fa33f648a4845832aa0df810a Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:12:43 +0530 Subject: [PATCH 1/2] test: cicd wait Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd-v2.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-cd-v2.yml b/.github/workflows/ci-cd-v2.yml index 2971c46871..4b3fb4d67f 100644 --- a/.github/workflows/ci-cd-v2.yml +++ b/.github/workflows/ci-cd-v2.yml @@ -52,7 +52,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/restTableOps.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -96,7 +96,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/restViews.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -140,7 +140,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/restRoles.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -184,7 +184,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/restMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -228,7 +228,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/docker-compose-cypress.yml up -d # spec: "./scripts/cypress-v2/integration/test/xcdb-restTableOps.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -272,7 +272,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/docker-compose-cypress.yml up -d # spec: "./scripts/cypress-v2/integration/test/xcdb-restViews.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -316,7 +316,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/docker-compose-cypress.yml up -d # spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -360,7 +360,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/xcdb-restMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -405,7 +405,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/docker-compose-cypress.yml up -d # spec: "./scripts/cypress-v2/integration/test/quickTest.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -449,7 +449,7 @@ jobs: # npm run start:api:cache:pg:cyquick # npm run start:web-v2 # spec: "./scripts/cypress-v2/integration/test/quickTest.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -493,7 +493,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d # spec: "./scripts/cypress-v2/integration/test/pg-restTableOps.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -537,7 +537,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d # spec: "./scripts/cypress-v2/integration/test/pg-restViews.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -581,7 +581,7 @@ jobs: # npm run start:web-v2 # docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d # spec: "./scripts/cypress-v2/integration/test/pg-restRoles.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" +# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" # wait-on-timeout: 1200 # config-file: scripts/cypress-v2/cypress.json # - name: Upload screenshots @@ -625,7 +625,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d spec: "./scripts/cypress-v2/integration/test/pg-restMisc.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -670,7 +670,7 @@ jobs: npm run start:web-v2 docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress-v2/integration/test/quickTest.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots @@ -714,7 +714,7 @@ jobs: npm run start:api:cache:pg:cyquick npm run start:web-v2 spec: "./scripts/cypress-v2/integration/test/quickTest.js" - wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress-v2/cypress.json - name: Upload screenshots From 7bdcf364cd750daac6d1c0e29a5d4fab5dfbf129 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:40:08 +0530 Subject: [PATCH 2/2] test: cicd enable roles suite for pg and xcdb sqlite Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd-v2.yml | 265 +++++++++++---------------------- 1 file changed, 88 insertions(+), 177 deletions(-) diff --git a/.github/workflows/ci-cd-v2.yml b/.github/workflows/ci-cd-v2.yml index 4b3fb4d67f..2a88913dce 100644 --- a/.github/workflows/ci-cd-v2.yml +++ b/.github/workflows/ci-cd-v2.yml @@ -282,50 +282,50 @@ jobs: # name: cypress-xcdb-restViews-run-cache-snapshots # path: scripts/cypress-v2/screenshots # retention-days: 2 -# cypress-xcdb-restRoles-run-cache: -# runs-on: ubuntu-20.04 -# steps: -# - name: Setup Node -# uses: actions/setup-node@v1 -# with: -# node-version: 16.15.0 -# - 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:cache -# npm run start:web-v2 -# docker-compose -f ./scripts/docker-compose-cypress.yml up -d -# spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" -# wait-on-timeout: 1200 -# config-file: scripts/cypress-v2/cypress.json -# - name: Upload screenshots -# if: always() -# uses: actions/upload-artifact@v2 -# with: -# name: cypress-xcdb-restRoles-run-cache-snapshots -# path: scripts/cypress-v2/screenshots -# retention-days: 2 + cypress-xcdb-restRoles-run-cache: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 16.15.0 + - 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:cache + npm run start:web-v2 + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress-v2/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-xcdb-restRoles-run-cache-snapshots + path: scripts/cypress-v2/screenshots + retention-days: 2 cypress-xcdb-restMisc-run-cache: runs-on: ubuntu-20.04 steps: @@ -370,95 +370,6 @@ jobs: name: cypress-xcdb-restMisc-run-cache-snapshots path: scripts/cypress-v2/screenshots retention-days: 2 -# cy-quick-sqlite: -# runs-on: ubuntu-20.04 -# steps: -# - name: Setup Node -# uses: actions/setup-node@v1 -# with: -# node-version: 16.15.0 -# - 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: | -# cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db -# npm run start:api:cache -# npm run start:web-v2 -# docker-compose -f ./scripts/docker-compose-cypress.yml up -d -# spec: "./scripts/cypress-v2/integration/test/quickTest.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" -# wait-on-timeout: 1200 -# config-file: scripts/cypress-v2/cypress.json -# - name: Upload screenshots -# if: always() -# uses: actions/upload-artifact@v2 -# with: -# name: cy-quick-sqlite-snapshots -# path: scripts/cypress-v2/screenshots -# retention-days: 2 -# cy-quick-pg: -# runs-on: ubuntu-20.04 -# steps: -# - name: Setup Node -# uses: actions/setup-node@v1 -# with: -# node-version: 16.15.0 -# - 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: | -# docker-compose -f ./scripts/cypress/docker-compose-pg-cy-quick.yml up -d -# npm run start:api:cache:pg:cyquick -# npm run start:web-v2 -# spec: "./scripts/cypress-v2/integration/test/quickTest.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" -# wait-on-timeout: 1200 -# config-file: scripts/cypress-v2/cypress.json -# - name: Upload screenshots -# if: always() -# uses: actions/upload-artifact@v2 -# with: -# name: cy-quick-pg-snapshots -# path: scripts/cypress-v2/screenshots -# retention-days: 2 # cypress-pg-restTableOps-run-cache: # runs-on: ubuntu-20.04 # steps: @@ -547,50 +458,50 @@ jobs: # name: cypress-pg-restViews-run-cache-snapshots # path: scripts/cypress-v2/screenshots # retention-days: 2 -# cypress-pg-restRoles-run-cache: -# runs-on: ubuntu-20.04 -# steps: -# - name: Setup Node -# uses: actions/setup-node@v1 -# with: -# node-version: 16.15.0 -# - 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:cache -# npm run start:web-v2 -# docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d -# spec: "./scripts/cypress-v2/integration/test/pg-restRoles.js" -# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" -# wait-on-timeout: 1200 -# config-file: scripts/cypress-v2/cypress.json -# - name: Upload screenshots -# if: always() -# uses: actions/upload-artifact@v2 -# with: -# name: cypress-pg-restRoles-run-cache-snapshots -# path: scripts/cypress-v2/screenshots -# retention-days: 2 + cypress-pg-restRoles-run-cache: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 16.15.0 + - 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:cache + npm run start:web-v2 + docker-compose -f ./scripts/cypress-v2/docker-compose-pg.yml up -d + spec: "./scripts/cypress-v2/integration/test/pg-restRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress-v2/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-pg-restRoles-run-cache-snapshots + path: scripts/cypress-v2/screenshots + retention-days: 2 cypress-pg-restMisc-run-cache: runs-on: ubuntu-20.04 steps: