From 099d41b982722779c592ebe1975293c58c10fd5a Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 3 Nov 2022 11:59:34 +0530 Subject: [PATCH] feat(testing): Enabled all the tests in CI --- .github/workflows/ci-cd.yml | 1918 +++++++++++++++++------------------ 1 file changed, 959 insertions(+), 959 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e7f1c4f47a..1e1416da8e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -25,709 +25,709 @@ concurrency: cancel-in-progress: true jobs: - # cypress-restTableOps-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + cypress-restTableOps-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-restTableOps-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-restViews-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-restTableOps-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restViews-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-restViews-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-restRoles-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-restViews-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restRoles-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-restRoles-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-restMisc-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-restRoles-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restMisc-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-restMisc-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-xcdb-restTableOps-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-xcdb-restTableOps-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-xcdb-restViews-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-restMisc-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restTableOps-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-xcdb-restViews-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-xcdb-restRoles-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-xcdb-restTableOps-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restViews-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-xcdb-restRoles-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-xcdb-restMisc-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-xcdb-restViews-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restRoles-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # 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/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-xcdb-restMisc-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restTableOps-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-xcdb-restRoles-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restMisc-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restTableOps.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-pg-restTableOps-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restViews-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + 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/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-xcdb-restMisc-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restTableOps-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restViews.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-pg-restViews-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restRoles-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-pg-restTableOps-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restViews-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/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/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-pg-restRoles-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restMisc-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-pg-restViews-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restRoles-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/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/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-pg-restRoles-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restMisc-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restMisc.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cypress-pg-restMisc-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cy-quick-sqlite: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cypress-pg-restMisc-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cy-quick-sqlite: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # docker-compose -f ./scripts/docker-compose-cypress.yml up -d - # spec: "./scripts/cypress/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/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cy-quick-sqlite-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cy-quick-pg: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + docker-compose -f ./scripts/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/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/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cy-quick-sqlite-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cy-quick-pg: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 - # spec: "./scripts/cypress/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/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v2 - # with: - # name: cy-quick-pg-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # unit-tests: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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 + spec: "./scripts/cypress/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/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v2 + with: + name: cy-quick-pg-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + unit-tests: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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: install dependencies nocodb-sdk - # working-directory: ./packages/nocodb-sdk - # run: npm install - # - name: build nocodb-sdk - # working-directory: ./packages/nocodb-sdk - # run: npm run build:main - # - name: Install dependencies - # working-directory: ./packages/nocodb - # run: npm install - # - name: setup mysql - # working-directory: ./ - # run: docker-compose -f ./scripts/docker-compose-cypress.yml up -d - # - name: run unit tests - # working-directory: ./packages/nocodb - # run: npm run test:unit - # cypress-db-independent: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # 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: install dependencies nocodb-sdk + working-directory: ./packages/nocodb-sdk + run: npm install + - name: build nocodb-sdk + working-directory: ./packages/nocodb-sdk + run: npm run build:main + - name: Install dependencies + working-directory: ./packages/nocodb + run: npm install + - name: setup mysql + working-directory: ./ + run: docker-compose -f ./scripts/docker-compose-cypress.yml up -d + - name: run unit tests + working-directory: ./packages/nocodb + run: npm run test:unit + cypress-db-independent: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + 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 @@ -788,10 +788,240 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:api:cache + npm run start:api:cache + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v3 + with: + name: cypress-restTableOps-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restViews-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v3 + 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@v4 + with: + start: | + npm run start:api:cache + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v3 + with: + name: cypress-restViews-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restRoles-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v3 + 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@v4 + with: + start: | + npm run start:api:cache + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/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/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v3 + with: + name: cypress-restRoles-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-restMisc-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v3 + 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@v4 + with: + start: | + npm run start:api:cache + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/restMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v3 + with: + name: cypress-restMisc-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restTableOps-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v3 + 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@v4 + with: + start: | + npm run start:xcdb-api:cache + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d + spec: "./scripts/cypress/integration/test/xcdb-restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + if: always() + uses: actions/upload-artifact@v3 + with: + name: cypress-xcdb-restTableOps-run-cache-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-xcdb-restViews-run-cache: + runs-on: ubuntu-20.04 + timeout-minutes: 30 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v3 + 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@v4 + with: + start: | + npm run start:xcdb-api:cache npm run start:web docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restTableOps.js" + spec: "./scripts/cypress/integration/test/xcdb-restViews.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json @@ -799,10 +1029,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-restTableOps-run-cache-snapshots + name: cypress-xcdb-restViews-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-restViews-run-cache: + cypress-xcdb-restRoles-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -834,10 +1064,10 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:api:cache + npm run start:xcdb-api:cache npm run start:web docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restViews.js" + spec: "./scripts/cypress/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/cypress.json @@ -845,10 +1075,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-restViews-run-cache-snapshots + name: cypress-xcdb-restRoles-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-restRoles-run-cache: + cypress-xcdb-restMisc-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -880,10 +1110,10 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:api:cache + npm run start:xcdb-api:cache npm run start:web docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restRoles.js" + spec: "./scripts/cypress/integration/test/xcdb-restMisc.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json @@ -891,10 +1121,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-restRoles-run-cache-snapshots + name: cypress-xcdb-restMisc-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-restMisc-run-cache: + cypress-pg-restTableOps-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -928,8 +1158,8 @@ jobs: start: | npm run start:api:cache npm run start:web - docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/restMisc.js" + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restTableOps.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json @@ -937,10 +1167,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-restMisc-run-cache-snapshots + name: cypress-pg-restTableOps-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-xcdb-restTableOps-run-cache: + cypress-pg-restViews-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -972,10 +1202,10 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:xcdb-api:cache + npm run start:api:cache npm run start:web - docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restTableOps.js" + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restViews.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json @@ -983,10 +1213,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-xcdb-restTableOps-run-cache-snapshots + name: cypress-pg-restViews-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-xcdb-restViews-run-cache: + cypress-pg-restRoles-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -1018,10 +1248,10 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:xcdb-api:cache + npm run start:api:cache npm run start:web - docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restViews.js" + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/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/cypress.json @@ -1029,10 +1259,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-xcdb-restViews-run-cache-snapshots + name: cypress-pg-restRoles-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-xcdb-restRoles-run-cache: + cypress-pg-restMisc-run-cache: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -1064,10 +1294,10 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:xcdb-api:cache + npm run start:api:cache npm run start:web - docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restRoles.js" + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restMisc.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 config-file: scripts/cypress/cypress.json @@ -1075,10 +1305,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-xcdb-restRoles-run-cache-snapshots + name: cypress-pg-restMisc-run-cache-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-xcdb-restMisc-run-cache: + cy-quick-sqlite: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -1110,10 +1340,11 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - npm run start:xcdb-api:cache + cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db + npm run start:api:cache npm run start:web docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d - spec: "./scripts/cypress/integration/test/xcdb-restMisc.js" + spec: "./scripts/cypress/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/cypress.json @@ -1121,10 +1352,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cypress-xcdb-restMisc-run-cache-snapshots + name: cy-quick-sqlite-snapshots path: scripts/cypress/screenshots retention-days: 2 - cypress-pg-restTableOps-run-cache: + cy-quick-pg: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -1142,190 +1373,6 @@ jobs: 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@v4 - # with: - # start: | - # npm run start:api:cache - # npm run start:web - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restTableOps.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v3 - # with: - # name: cypress-pg-restTableOps-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restViews-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # steps: - # - name: Setup Node - # uses: actions/setup-node@v3 - # with: - # node-version: 16.15.0 - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Cache node modules - # uses: actions/cache@v3 - # 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@v4 - # with: - # start: | - # npm run start:api:cache - # npm run start:web - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restViews.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v3 - # with: - # name: cypress-pg-restViews-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restRoles-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # steps: - # - name: Setup Node - # uses: actions/setup-node@v3 - # with: - # node-version: 16.15.0 - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Cache node modules - # uses: actions/cache@v3 - # 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@v4 - # with: - # start: | - # npm run start:api:cache - # npm run start:web - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/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/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v3 - # with: - # name: cypress-pg-restRoles-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cypress-pg-restMisc-run-cache: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # steps: - # - name: Setup Node - # uses: actions/setup-node@v3 - # with: - # node-version: 16.15.0 - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Cache node modules - # uses: actions/cache@v3 - # 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@v4 - # with: - # start: | - # npm run start:api:cache - # npm run start:web - # docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d - # spec: "./scripts/cypress/integration/test/pg-restMisc.js" - # wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" - # wait-on-timeout: 1200 - # config-file: scripts/cypress/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v3 - # with: - # name: cypress-pg-restMisc-run-cache-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # cy-quick-sqlite: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # steps: - # - name: Setup Node - # uses: actions/setup-node@v3 - # with: - # node-version: 16.15.0 - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Cache node modules - # uses: actions/cache@v3 - # env: - # cache-name: cache-node-modules - with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm @@ -1340,10 +1387,9 @@ jobs: uses: cypress-io/github-action@v4 with: start: | - cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db - npm run start:api:cache + docker-compose -f ./scripts/cypress/docker-compose-pg-cy-quick.yml up -d + npm run start:api:cache:pg:cyquick npm run start:web - docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/quickTest.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/assets/img/icons/512x512-trans.png" wait-on-timeout: 1200 @@ -1352,10 +1398,10 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: cy-quick-sqlite-snapshots + name: cy-quick-pg-snapshots path: scripts/cypress/screenshots retention-days: 2 - cy-quick-pg: + unit-tests: runs-on: ubuntu-20.04 timeout-minutes: 30 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -1373,52 +1419,6 @@ jobs: 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@v4 - # 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 - # spec: "./scripts/cypress/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/cypress.json - # - name: Upload screenshots - # if: always() - # uses: actions/upload-artifact@v3 - # with: - # name: cy-quick-pg-snapshots - # path: scripts/cypress/screenshots - # retention-days: 2 - # unit-tests: - # runs-on: ubuntu-20.04 - # timeout-minutes: 30 - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # steps: - # - name: Setup Node - # uses: actions/setup-node@v3 - # with: - # node-version: 16.15.0 - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Cache node modules - # uses: actions/cache@v3 - # env: - # cache-name: cache-node-modules - with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm