Skip to content

Commit

Permalink
feat: switch to debug module for verbose logs (cypress-io#379)
Browse files Browse the repository at this point in the history
This action uses the [debug](https://github.com/visionmedia/debug#readme) module to output additional verbose logs. You can see these debug messages by setting the following environment variable:

```
DEBUG: @cypress/github-action
```

You can set the environment variable using GitHub UI interface, or in the workflow file:

```yml
- name: Cypress tests with debug logs
  uses: cypress-io/github-action@v2
  env:
    DEBUG: '@cypress/github-action'
```
  • Loading branch information
bahmutov committed May 25, 2021
1 parent 6932ccd commit 6b3bc3a
Show file tree
Hide file tree
Showing 7 changed files with 1,887 additions and 692 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/example-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: example-debug
on: push
jobs:
nightly:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cypress debug logs 📝
uses: ./
env:
DEBUG: '@cypress/github-action'
with:
working-directory: examples/basic
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1063,14 +1063,22 @@ This action uses several production dependencies. The minimum Node version requi

## Debugging

You can see verbose messages from GitHub Actions by setting the following secrets (from [Debugging Actions Guide](https://github.com/actions/toolkit/blob/master/docs/action-debugging.md#step-debug-logs))
This action uses the [debug](https://github.com/visionmedia/debug#readme) module to output additional verbose logs. You can see these debug messages by setting the following environment variable:

```
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
DEBUG: @cypress/github-action
```
The `ACTIONS_RUNNER_DEBUG` will show generic Actions messages, while `ACTIONS_STEP_DEBUG` will enable the `core.debug(...)` messages from this actions.
You can set the environment variable using GitHub UI interface, or in the workflow file:
```yml
- name: Cypress tests with debug logs
uses: cypress-io/github-action@v2
env:
DEBUG: '@cypress/github-action'
```

See the [example-debug.yml](./.github/workflows/example-debug.yml) workflow file.

### Logs from the test runner

Expand Down
Loading

0 comments on commit 6b3bc3a

Please sign in to comment.