scully: Scully Doesn't work with Github Actions {Tried with --host as well}

🐞 Bug report

Description

There’s some issue with scully, it doesn’t build up while running inside github actions.

🔬 Minimal Reproduction

.github/workflows/build.yml

name: Angular Build Test

on:
  pull_request:
    branches:
      - develop

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [12.x]

    steps:
      - uses: actions/checkout@v1

      - name: Cache node modules
        uses: actions/cache@v1
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install
        run: npm ci

      - name: Build
        run: npm run build:prod --if-present

      - name: Scully
        run: npm run scully -- --host='0.0.0.0'

💻Your Environment

Angular Version:

9.1.0

Scully Version:

6.13.4

🔥 Exception or Error

> ***@5.0.0 scully /home/runner/work/***/***
> scully "--host=0.0.0.0"

 ☺   new Angular build imported
 ☺   Started servers in background
Could not connect to server
npm ERR! code ELIFECYCLE
npm ERR! errno 15
npm ERR! ***@5.0.0 scully: `scully "--host=0.0.0.0"`
npm ERR! Exit status 15
npm ERR! 
npm ERR! Failed at the ***@5.0.0 scully script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2020-04-13T06_08_54_188Z-debug.log
##[error]Process completed with exit code 15.

🔥 Screenshots

Screenshot 2020-04-13 at 12 02 31 PM

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 31 (19 by maintainers)

Commits related to this issue

Most upvoted comments

It would be great to see the docs include a mention of an off-the-shelf, maintained Docker image to CI build-test in, in which Scully + CLI ‘just works’.

@SanderElias It works, but 30s wasn’t working in my job, and I change to 60s in GitHub Action.

npm run scully -- --host='0.0.0.0' --scanRoutes --serverTimeout=60000

here is log action result


49s
Wrote 5 routes to sitemap.xml
Run npm run scully -- --host='0.0.0.0' --scanRoutes --serverTimeout=60000
  npm run scully -- --host='0.0.0.0' --scanRoutes --serverTimeout=60000
  shell: /bin/bash -e {0}

> ledge@0.0.0 scully /home/runner/work/ledge/ledge
> scully --scanRoutes "--host=0.0.0.0" "--scanRoutes" "--serverTimeout=60000"

/home/runner/work/ledge/ledge /home/runner/work/ledge/ledge
 ☺   new Angular build imported
 ☺   Started servers in background
Finding all routes in application.
traversing app for routes
Pull in data to create additional routes.
No configuration for route "/think-tank/:tank" found. Skipping
Route list created in files:
  "/home/runner/work/ledge/ledge/src/assets/scully-routes.json",
  "/home/runner/work/ledge/ledge/dist/static/assets/scully-routes.json",
  "/home/runner/work/ledge/ledge/dist/ledge/assets/scully-routes.json"

 Route "/pattern" rendered into file: "/home/runner/work/ledge/ledge/dist/static/pattern/index.html"
Wrote 1 route to sitemap.xml
Route "/practise" rendered into file: "/home/runner/work/ledge/ledge/dist/static/practise/index.html"
Wrote 2 routes to sitemap.xml
Route "/manual" rendered into file: "/home/runner/work/ledge/ledge/dist/static/manual/index.html"
Wrote 3 routes to sitemap.xml
Route "/maturity" rendered into file: "/home
……

I wanted to add a note that

    "scully": "scully --serverTimeout 30000",
    "scully:serve": "scully serve"

Has also worked for me in Azure DevOps Pipelines, which previously also timed out. @SanderElias I think this would be a really good topic to be on the main Scully Docs under continuous integration. I had to dig into the issues to find this gem.

image

image

For the moment the following Docker hub image, made by the fine people at BuiltKite, does the job well:

buildkite/puppeteer

You have to use the puppeteer arguments to make it tolerate running inside docker., these are shown in a comment in the source code.

I just pushed Scully v0.0.87 to npm. @phodal , @BlindDespair , @dr5hn, can you try updating your CI with this flag: scully --serverTimeout 30000 (and add the existing flags if needed.) This will use a 30 seconds timeout instead of the 10 that is the default, you can go even longer on large projects the guess-parser sometimes needs more time, this way, you can give it. Perhaps you even need to go longer as the minute I put in above