Browse Source

chore(cypress): cypress docker compose update

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/653/head
Pranav C 3 years ago
parent
commit
a49b5021ca
  1. 36
      .github/workflows/ci-cd.yml
  2. 4
      docker-compose-cypress.yml

36
.github/workflows/ci-cd.yml

@ -9,24 +9,24 @@ on:
branches: [ master ]
jobs:
# cypress-run:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Check for update
# run: |
# echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nc-gui) = nc-gui ]] && echo 'OK')" >> $GITHUB_ENV
#
# - name: Cypress run
# if: ${{ env.CHANGED == 'OK' }}
# uses: cypress-io/github-action@v2
# with:
# start: docker-compose -f ./docker-compose-cypress.yml up -d
# wait-on: 'http://localhost:3000'
# wait-on-timeout: 900
cypress-run:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check for update
run: |
echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep nc-gui) = nc-gui ]] && echo 'OK')" >> $GITHUB_ENV
- name: Cypress run
if: ${{ env.CHANGED == 'OK' }}
uses: cypress-io/github-action@v2
with:
start: docker-compose -f ./docker-compose-cypress.yml up -d
wait-on: 'http://localhost:3000'
wait-on-timeout: 900
docker:
runs-on: ubuntu-latest
steps:

4
docker-compose-cypress.yml

@ -44,8 +44,8 @@ services:
apk --update --no-cache add git
# cp -r /home/app1/ /home/app/
rm /home/app/package-lock.json
# cd /home/app/ && npm i && npm run dev
cd /home/app/ && npm i && NODE_ENV=development npm run build && npm start
cd /home/app/ && npm i && npm run dev
# cd /home/app/ && npm i && NODE_ENV=development npm run build && npm start

Loading…
Cancel
Save