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", () => {