Browse Source

refactor ci-cd suite size

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3335/head
Raju Udava 2 years ago
parent
commit
46eb6ed507
  1. 884
      .github/workflows/ci-cd-v2.yml
  2. 1
      package.json

884
.github/workflows/ci-cd-v2.yml

@ -17,184 +17,7 @@ on:
- "scripts/cypress-v2/**" - "scripts/cypress-v2/**"
- "packages/nocodb/**" - "packages/nocodb/**"
- ".github/workflows/ci-cd-v2.yml" - ".github/workflows/ci-cd-v2.yml"
jobs: jobs:
cypress-pg-restTableOps-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-restTableOps.js"
wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
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-restTableOps-run-cache-snapshots
path: scripts/cypress-v2/screenshots
retention-days: 2
cypress-pg-restViews-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-restViews.js"
wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
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-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/entry.mjs"
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:
- 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-restMisc.js"
wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
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-restMisc-run-cache-snapshots
path: scripts/cypress-v2/screenshots
retention-days: 2
cypress-restTableOps-run-cache: cypress-restTableOps-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
@ -371,268 +194,445 @@ jobs:
name: cypress-restMisc-run-cache-snapshots name: cypress-restMisc-run-cache-snapshots
path: scripts/cypress-v2/screenshots path: scripts/cypress-v2/screenshots
retention-days: 2 retention-days: 2
cypress-xcdb-restTableOps-run-cache: # cypress-xcdb-restTableOps-run-cache:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
npm run start:xcdb-api:cache # npm run start:xcdb-api:cache
npm run start:web-v2 # npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restTableOps.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cypress-xcdb-restTableOps-run-cache-snapshots # name: cypress-xcdb-restTableOps-run-cache-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
cypress-xcdb-restViews-run-cache: # cypress-xcdb-restViews-run-cache:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
npm run start:xcdb-api:cache # npm run start:xcdb-api:cache
npm run start:web-v2 # npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restViews.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cypress-xcdb-restViews-run-cache-snapshots # name: cypress-xcdb-restViews-run-cache-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
cypress-xcdb-restRoles-run-cache: # cypress-xcdb-restRoles-run-cache:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
npm run start:xcdb-api:cache # npm run start:xcdb-api:cache
npm run start:web-v2 # npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cypress-xcdb-restRoles-run-cache-snapshots # name: cypress-xcdb-restRoles-run-cache-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
cypress-xcdb-restMisc-run-cache: # cypress-xcdb-restMisc-run-cache:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
npm run start:xcdb-api:cache # npm run start:xcdb-api:cache
npm run start:web-v2 # npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restMisc.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cypress-xcdb-restMisc-run-cache-snapshots # name: cypress-xcdb-restMisc-run-cache-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
cy-quick-sqlite: # cy-quick-sqlite:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db # cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db
npm run start:api:cache # npm run start:api:cache
npm run start:web-v2 # npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/quickTest.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cy-quick-sqlite-snapshots # name: cy-quick-sqlite-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
cy-quick-pg: # cy-quick-pg:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Setup Node # - name: Setup Node
uses: actions/setup-node@v1 # uses: actions/setup-node@v1
with: # with:
node-version: 16.15.0 # node-version: 16.15.0
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Cache node modules # - name: Cache node modules
uses: actions/cache@v2 # uses: actions/cache@v2
env: # env:
cache-name: cache-node-modules # cache-name: cache-node-modules
#
with: # with:
# npm cache files are stored in `~/.npm` on Linux/macOS # # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm # path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- # ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- # ${{ runner.os }}-build-
${{ runner.os }}- # ${{ runner.os }}-
- name: Set env # - name: Set env
run: echo "NODE_ENV=test" >> $GITHUB_ENV # run: echo "NODE_ENV=test" >> $GITHUB_ENV
- name: Cypress run # - name: Cypress run
uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
with: # with:
start: | # start: |
docker-compose -f ./scripts/cypress/docker-compose-pg-cy-quick.yml up -d # docker-compose -f ./scripts/cypress/docker-compose-pg-cy-quick.yml up -d
npm run start:api:cache:pg:cyquick # npm run start:api:cache:pg:cyquick
npm run start:web-v2 # npm run start:web-v2
spec: "./scripts/cypress-v2/integration/test/quickTest.js" # 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/entry.mjs"
wait-on-timeout: 1200 # wait-on-timeout: 1200
config-file: scripts/cypress-v2/cypress.json # config-file: scripts/cypress-v2/cypress.json
- name: Upload screenshots # - name: Upload screenshots
if: always() # if: always()
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: cy-quick-pg-snapshots # name: cy-quick-pg-snapshots
path: scripts/cypress-v2/screenshots # path: scripts/cypress-v2/screenshots
retention-days: 2 # retention-days: 2
# cypress-pg-restTableOps-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-restTableOps.js"
# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
# 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-restTableOps-run-cache-snapshots
# path: scripts/cypress-v2/screenshots
# retention-days: 2
# cypress-pg-restViews-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-restViews.js"
# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
# 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-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/entry.mjs"
# 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:
# - 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-restMisc.js"
# wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/entry.mjs"
# 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-restMisc-run-cache-snapshots
# path: scripts/cypress-v2/screenshots
# retention-days: 2
#

1
package.json

@ -25,6 +25,7 @@
"start:web-v2": "npm run build:common ; cd ./packages/nc-gui-v2; npm install ../nocodb-sdk; npm install; npm run dev", "start:web-v2": "npm run build:common ; cd ./packages/nc-gui-v2; npm install ../nocodb-sdk; npm install; npm run dev",
"cypress:run": "cypress run --config-file ./scripts/cypress/cypress.json", "cypress:run": "cypress run --config-file ./scripts/cypress/cypress.json",
"cypress:open": "cypress open --config-file ./scripts/cypress/cypress.json", "cypress:open": "cypress open --config-file ./scripts/cypress/cypress.json",
"cypress-v2:run": "cypress run --config-file ./scripts/cypress-v2/cypress.json",
"cypress-v2:open": "cypress open --config-file ./scripts/cypress-v2/cypress.json", "cypress-v2:open": "cypress open --config-file ./scripts/cypress-v2/cypress.json",
"cypress:clear": "cypress cache clear", "cypress:clear": "cypress cache clear",
"test:travis": "git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna run test:travis --since", "test:travis": "git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna run test:travis --since",

Loading…
Cancel
Save