Browse Source

chore(actions): cypress test

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/510/head
Pranav C 3 years ago
parent
commit
8971a7f2cd
  1. 4
      .github/workflows/ci-cd.yml
  2. 43
      docker-compose-cypress.yml
  3. 2
      packages/nc-gui/package.json

4
.github/workflows/ci-cd.yml

@ -4,7 +4,7 @@
name: "CI/CD" name: "CI/CD"
on: on:
push: push:
branches: [ master ] branches: [ master, cypress ]
pull_request: pull_request:
branches: [ master ] branches: [ master ]
@ -19,7 +19,7 @@ jobs:
with: with:
start: docker-compose -f ./docker-compose-cypress.yml up start: docker-compose -f ./docker-compose-cypress.yml up
wait-on: 'http://localhost:8080/dashboard' wait-on: 'http://localhost:8080/dashboard'
wait-on-timeout: 240 wait-on-timeout: 900
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest

43
docker-compose-cypress.yml

@ -1,15 +1,34 @@
version: "3.5" version: "3.5"
services: services:
xc-cypress-test: mysql:
image: node:12.22.1-slim image: mysql:5.7
ports: restart: always
- 8080:8080 environment:
volumes: MYSQL_ROOT_PASSWORD: password
- ./packages/nocodb:/home/app ports:
command: - 3306:3306
- /bin/bash volumes:
- -c - ./packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d
- | healthcheck:
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" test: "/etc/init.d/mysql status"
cd /home/app/ && npm i && npm run run interval: 1s
retries: 240
xc-cypress-nocodb:
image: node:12.22.1-slim
ports:
- "8080:8080"
volumes:
- ./packages/:/home/packages/
depends_on:
- mysql
command:
- /bin/bash
- -c
- |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
apt-get update && apt-get install rsync -y
cp -r /home/packages/ /home/app/
cd /home/app/nc-gui && npm i && npm run build:copy && cd ../nc-lib-gui && npm i
rm -rf /home/app/nocodb/node_modules/nc-lib-gui
cd /home/app/nocodb && npm i ../nc-lib-gui ; npm i && npm run run

2
packages/nc-gui/package.json

@ -8,7 +8,7 @@
"lint": "eslint . --ext .js,.vue --fix --quiet", "lint": "eslint . --ext .js,.vue --fix --quiet",
"start": "nuxt start", "start": "nuxt start",
"generate": "nuxt generate", "generate": "nuxt generate",
"build:copy": "npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/", "build:copy": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/",
"build:copy:jsdeliver": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/ ; npm publish ../nc-lib-gui" "build:copy:jsdeliver": "EE=true npm run build; rm -rf ../nc-lib-gui/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui/lib/dist/ ; npm publish ../nc-lib-gui"
}, },
"dependencies": { "dependencies": {

Loading…
Cancel
Save