diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 446bb4574e..782d703ebc 100644 --- a/.github/workflows/ci-cd.yml +++ b/.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: diff --git a/docker-compose-cypress.yml b/docker-compose-cypress.yml index 899a943d34..1ed8417f0e 100644 --- a/docker-compose-cypress.yml +++ b/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