From f8c8e934f4578bc20d6b81f979c31616bfd6bf9c Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Fri, 25 Jun 2021 20:15:50 +0530 Subject: [PATCH] chore: Github action - cypress Added separate docker-compose and updated cypress job Signed-off-by: Pranav C --- .github/workflows/node.yml | 22 +++++++++++----------- docker-compose-cypress.yml | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 docker-compose-cypress.yml diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 36d512d609..4cbf45e79d 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -10,17 +10,17 @@ on: branches: [ master ] jobs: -# cypress-run: -# runs-on: ubuntu-20.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v2 -# - name: Cypress run -# uses: cypress-io/github-action@v2 -# with: -# start: cd ./packages/nocodb/ && docker-compose run --service-ports -d xc-cypress-test ; sleep 60 ; ../..; -# wait-on: 'http://localhost:8080/dashboard' -# wait-on-timeout: 1200 + cypress-run: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: docker-compose -f ./docker-compose-cypress.yml up + wait-on: 'http://localhost:8080/dashboard' + wait-on-timeout: 240 docker: runs-on: ubuntu-latest diff --git a/docker-compose-cypress.yml b/docker-compose-cypress.yml new file mode 100644 index 0000000000..b048d819d1 --- /dev/null +++ b/docker-compose-cypress.yml @@ -0,0 +1,15 @@ +version: "3.5" + +services: + xc-cypress-test: + image: node:12.22.1-slim + ports: + - 8080:8080 + volumes: + - ./packages/nocodb:/home/app + command: + - /bin/bash + - -c + - | + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + cd /home/app/ && npm i && npm run run