Github Action: Error: net::ERR_CONNECTION_REFUSED on running puppetter

Viewed 709

when any push happens in a branch, I want to run my app and test something with puppeteer. but when test file exectues inside github action, I am getting the following error

Error: net::ERR_CONNECTION_REFUSED at http://localhost:8080 at navigate (node_modules/puppeteer/lib/FrameManager.js:120:37)

where, 8080 is my frontend port.

what causes this error and how can I fix this?

here is my gihub action file:

name: "Github Actions Test"
on:
  push:
    branches:
      - wip/checkout2

jobs:
  test:
    runs-on: ubuntu-latest

    env:
      PRISMA_ENDPOINT: ${{secrets.PRISMA_ENDPOINT}}
      PRISMA_SECRET: ${{secrets.PRISMA_SECRET}}

    steps:
      - uses: actions/checkout@v1
      - name: "Install Node"
        uses: actions/setup-node@v1
        with:
          node-version: "12.x"
      - name: "Install global packages"
        run: npm install -g yarn prisma-cli concurrently mocha
      - name: "Run docker Container"
        run: docker-compose -f docker-compose.yml up --build -d
      - name: "Install deps"
        run: yarn install
      - name: "prisma deploy"
        run: yarn deploy:backend
      - name: "Seed Backend"
        run: yarn seed:backend
      - name: "Build app"
        run: yarn build
      - name: "Start backend and frontend concurrently on background and run tests"
        run: |
          yarn start &
          yarn test

0 Answers
Related