mujo-code / puppeteer-headful

Github Action for puppeteer that is headful.
MIT License
100 stars 43 forks source link

Unable to view output from command #15

Closed bantic closed 4 years ago

bantic commented 4 years ago

Hi, I'm using this action and it doesn't seem to actually run my command.

The relevant section of my workflow yml looks like this:

      - name: Run Tests
        uses: mujo-code/puppeteer-headful@master
        env:
          CI: 'true'
        with:
          args: cd ./ember-debugger && yarn run test

When the github action runs, the "Run Tests" step completes in just 15s, and the only output in the logs is:

/usr/bin/docker run --name dd9e7397d7b3e5ce35497d97550af0970d049d_28b7b4 --label dd9e73 --workdir /github/workspace --rm -e CI -e INPUT_ARGS -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/chrome-extensions/chrome-extensions":"/github/workspace" dd9e73:97d7b3e5ce35497d97550af0970d049d cd ./ember-debugger && yarn run test
Running 'cd ./ember-debugger && yarn run test'!
Successfully ran 'cd ./ember-debugger && yarn run test'

The yarn run test command should be printing out some output that should appear in the logs, and the test command typically takes ~30s locally. I've added an explicit assert.ok(false) to my code, too, to ensure that the test command fails.

Any suggestions for debugging this?

jcblw commented 4 years ago

Hey the @bantic, so it seems like the other command is not running at all? I would expect there is something funky going on when using && which I think would be supported. Does anything print out when you do something like cd ./ember-debugger && echo "it works!" for the args. I'll see if I can set up some test cases for this Saturday.

bantic commented 4 years ago

@jcblw Thanks for the reply. You are right, it was the &&! I changed my command to be a single shell script instead, and was able to run multiple commands from within it.

Unfortunately once I got puppeteer running I did run into a separate issue (#17).

K0IN commented 2 years ago

Ye, I have the same problem is there any other way to fix this (with using &&)—my NPM project is not at the root of the git project.

jcblw commented 2 years ago

@K0IN there is probably a number of ways to resolve this, you can attempt to put the full command in a sh file and run that or even a Makefile. Really any way to combine the commands, as long as there is only one command.