percy / exec-action

A (deprecated) GitHub action to run Percy Agent `percy exec` commands
https://docs.percy.io/docs/github-actions#section-exec-action
MIT License
8 stars 5 forks source link

exec-action fails when triggered by schedule in GitHub Actions #8

Closed dominicroessner closed 4 years ago

dominicroessner commented 4 years ago

We are executing Percy visual tests within our Cypress end-to-end test framework and are using the Percy exec-action in our GitHub Actions workflow. Tests run fine when the workflow is triggered on a pull request, but not on a schedule.

Here's our GitHub workflow setup for the trigger:

name: E2E Testing

on:
  schedule:
    # Run at 6am, 10am, 2pm, and 6pm every day
    - cron: "0 6,10,14,18 * * *"

And here is the log from when GitHub Actions executes percy/exec-action@v0.1.0

##[group]Run percy/exec-action@v0.1.0
with:
  command: cypress run --browser chrome --record --parallel --ci-build-id=$CYPRESS_CI_BUILD_ID
  working-directory: ./
  silence: false
  verbose: false
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.7.5/x64
  CI: 1
  CYPRESS_CACHE_FOLDER: /home/runner/.cache/Cypress
  PERCY_TOKEN: ***
  CYPRESS_RECORD_KEY: ***
  CYPRESS_CI_BUILD_ID: 245c5acac86c06f269991fca3e900eef43bea5d1-27344
##[endgroup]
##[error]Cannot read property 'replace' of undefined
##[error]Node run failed with exit code 1

The issue might be here: https://github.com/percy/exec-action/blob/master/src/index.js#L17

Robdel12 commented 4 years ago

Hey @dominicroessner sorry for the long turn around on this! This should be fixed in v0.1.3 now (#10)