From c05f6458e998f258fedf4059d8f3495c823aae11 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 29 Aug 2022 12:13:35 +0530 Subject: [PATCH] test: CI-CD enable quicktest Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .github/workflows/ci-cd-v2.yml | 91 +++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-v2.yml b/.github/workflows/ci-cd-v2.yml index fd2057c6ce..4edb21c879 100644 --- a/.github/workflows/ci-cd-v2.yml +++ b/.github/workflows/ci-cd-v2.yml @@ -635,4 +635,93 @@ jobs: # name: cypress-pg-restMisc-run-cache-snapshots # path: scripts/cypress-v2/screenshots # retention-days: 2 -# \ No newline at end of file +# + 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-v2/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" + 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-v2/docker-compose-pg-cy-quick.yml up -d + npm run start:api:cache:pg:cyquick + npm run start:web + spec: "./scripts/cypress-v2/integration/test/quickTest.js" + wait-on: "http://localhost:8080" + 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