Skip to content

Commit

Permalink
chore: update docs about step outcome, closes cypress-io#396
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jun 29, 2021
1 parent e0a93b0 commit f579b42
Show file tree
Hide file tree
Showing 3 changed files with 382 additions and 232 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/example-recording.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.EXAMPLE_RECORDING_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# see "outcome" and "conclusion" of a step doc
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
# "output" can be success, failure, cancelled, or skipped
- name: Print Dashboard URL
run: |
echo Cypress finished with: ${{ steps.cypress.outcome }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,8 @@ This GH Action sets an output `dashboardUrl` if the run was recorded on [Cypress

[![recording example](https://github.com/cypress-io/github-action/workflows/example-recording/badge.svg?branch=master)](.github/workflows/example-recording.yml)

**Note:** every GH workflow step can have `outcome` and `conclusion` properties. See the documentation at [steps context](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context) page. In particular, the `output` value can be `success`, `failure`, `cancelled`, or `skipped` which you can use the next steps that follow.

### Docker image

If your repository does not have `package.json` or `yarn.json` (maybe it contains a static site and does not need any dependencies), you can run Cypress tests using `cypress/included:...` [Cypress Docker images](https://github.com/cypress-io/cypress-docker-images/tree/master/included). In that case you don't even need this GH Action, instead use the Docker container and write `cypress run` command like this example from [cypress-gh-action-included](https://github.com/bahmutov/cypress-gh-action-included)
Expand Down
Loading

0 comments on commit f579b42

Please sign in to comment.