Skip to content

Commit

Permalink
add a note about debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Dec 28, 2020
1 parent b03d64a commit 5d0844f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,19 @@ ACTIONS_STEP_DEBUG: true
The `ACTIONS_RUNNER_DEBUG` will show generic Actions messages, while `ACTIONS_STEP_DEBUG` will enable the `core.debug(...)` messages from this actions.
### Logs from the test runner
The above `ACTIONS_STEP_DEBUG` setting enables the debug logs from the action itself. To see the [Cypress debug logs](http://on.cypress.io/troubleshooting#Print-DEBUG-logs) add an environment variable to the action:
```yml
- name: Cypress tests with debug logs
uses: cypress-io/github-action@v2
env:
DEBUG: 'cypress:*'
```

### Debugging waiting for URL to respond

If you have a problem with `wait-on` not working, you can check the [src/ping.js](src/ping.js) logic from the local machine.

- clone this repository to the local machine
Expand Down
8 changes: 3 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8636,11 +8636,9 @@ const getNpmCache = () => {

// custom Cypress binary cache folder
// see https://on.cypress.io/caching
const CYPRESS_CACHE_FOLDER = path.join(
homeDirectory,
'.cache',
'Cypress'
)
const CYPRESS_CACHE_FOLDER =
process.env.CYPRESS_CACHE_FOLDER ||
path.join(homeDirectory, '.cache', 'Cypress')
core.debug(
`using custom Cypress cache folder "${CYPRESS_CACHE_FOLDER}"`
)
Expand Down
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,9 @@ const getNpmCache = () => {

// custom Cypress binary cache folder
// see https://on.cypress.io/caching
const CYPRESS_CACHE_FOLDER = process.env.CYPRESS_CACHE_FOLDER || path.join(
homeDirectory,
'.cache',
'Cypress'
)
const CYPRESS_CACHE_FOLDER =
process.env.CYPRESS_CACHE_FOLDER ||
path.join(homeDirectory, '.cache', 'Cypress')
core.debug(
`using custom Cypress cache folder "${CYPRESS_CACHE_FOLDER}"`
)
Expand Down

0 comments on commit 5d0844f

Please sign in to comment.