Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.17 KB

DEVELOPMENT.md

File metadata and controls

52 lines (38 loc) · 2.17 KB

Development

Testing via examples

  1. Add a new example project in examples folder. It is a regular NPM package with its own package.json and Cypress dev dependency.
  2. Add a corresponding .github/workflows YAML file that uses this action and runs inside examples/X working directory. The example should demonstrate the feature
  3. Add workflow badge to README if needed

Testing against another repo

  1. Create a new local branch for any development, for example git checkout -b featureA
  2. Update the source code in index.js
  3. Build dist file(s) using npm run build
  4. Commit any changed files, note the SHA of the commit
  5. Push the local branch to GitHub
  6. In a test repository, create a test branch, change the action to point at the new commit. Example
name: End-to-end tests
on: [push]
jobs:
  cypress-run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      # use specific commit pushed to GitHub
      - uses: cypress-io/github-action@2a1baeb

You can use cypress-gh-action-example or cypress-gh-action-monorepo as test projects.

  1. Push the change and make sure the new feature performs correctly. If yes, open a pull request.

For pull request reviewers:

  1. When merging a pull request, squash all commits into one.
  2. Make sure the commit subject and body follow semantic commit convention. I prefer simplicity:
feat: added new parameter
fix: fixed a bug

If you need to bump major version, mark it as breaking change in the body of the commit's message like:

fix: upgrade dependency X

BREAKING CHANGE: requires Node 8 to run
  1. New versions of this action will be released automatically by the CI, see .github/workflows/main.yml. This will create a new GitHub release and will update the current /v1 branch. Thus every user that use - uses: cypress-io/github-action@v2 will be using the new version automatically.