sorry-cypress
  • Documentation
  • Guide
    • Get Started
    • Dashboard and API
    • Cloud Setup
  • Cloud
    • AWS
      • Basic AWS Setup
      • Advanced AWS Setup
      • AWS Networking
      • AWS S3 Manual Setup
    • Google Cloud
      • Google Cloud & MinIO - Deprecated
    • Microsoft Azure
    • Heroku
    • Kubernetes
    • Docker Images
  • Integrating Cypress
    • Integration options
    • cy2 - Deprecated
    • Agent Configuration - Deprecated
    • CLI One Liners - Deprecated
  • Configuration
    • Basic Setup
    • Full Setup
    • Director Service
      • AWS Role Assumption via Service Account
      • AWS S3 Configuration
      • Minio Configuration
      • Azure Blob Storage Configuration
    • API Service
    • Web Dashboard
      • Configuration
    • MongoDB Configuration
    • Troubleshooting
  • Integrations
    • Events
    • Webhooks
    • Slack Integration
    • GitHub Integration
    • BitBucket Integration
    • MS Teams Integration
  • Concepts
    • Parallelization Explained
    • Flaky Tests
    • Test Details
    • Test Status
  • CI
    • GitHub Actions
    • Travis
    • Jenkins
    • AWS Codebuild
  • Development
    • Changelog
    • Development Guide
  • Community Content
  • ❤️ Contributions
  • Support
  • Legal
  • FAQ
Powered by GitBook
On this page
  • GitHub Codespaces
  • Local Development
  • Add .env configuration to services
  • Override localhost network
  • Start minio and mongo background services
  • Start all the services in dev mode
  • Prevent CI
  • Releasing a new version
  • Releasing latest tag
Edit on GitHub
  1. Development

Development Guide

PreviousChangelogNextCommunity Content

Last updated 3 years ago

GitHub Codespaces

Start developing using remote, pre-configured environment within minutes.

Sorry Cypress supports remote development using All the services are pre-configured to run in a remote, containerized environment and allows starting developing within minutes.

To start, create a new codespace using as a source

Within the Codespace, open a terminal and run

yarn && yarn dev

This command will start all the internal services and will expose the ports on localhost:

  • 8080 - dashboard

  • 1234 - director

  • 4000 - API

  • 9000 - minio

To start sending cypress tests to your dev instance, run:

 CYPRESS_API_URL=http://localhost:1234/ && \
 yarn cy2 run --parallel --record --key whatever

Tips

  • Don't use broser-based VS Code to connect to a codespace - it doesn't allow access to sorry-cypress services via localhost

  • If the services become unavailable via published ports, delete and re-add them in "Ports" tab of VS Code

  • Run yarn killall && yarn dev to stop and start all the services - sometimes they hang and keep their ports busy

Local Development

We use yarn workspaces, please use yarn.

Add .env configuration to services

Add .env file with the following contents:

# packages/director/.env
EXECUTION_DRIVER="../execution/mongo/driver"
SCREENSHOTS_DRIVER="../screenshots/minio.driver"
MINIO_ACCESS_KEY='MW32h3gd6HvjBEgTRx'
MINIO_SECRET_KEY=t6NgQWUcEyG2AzaDCVkN6sbWcvDCVkN6sGiZ7
MINIO_ENDPOINT='storage'
MINIO_URL='http://localhost'
MINIO_PORT='9000'
MINIO_USESSL='false'
MINIO_BUCKET=sorry-cypress

# packages/dashboard/.env
GRAPHQL_SCHEMA_URL=http://api.sc.com:4000

Override localhost network

Add the following entries to /etc/hosts or an equivalent file on Windows

127.0.0.1 storage
127.0.0.1 api.sc.com

Start minio and mongo background services

docker-compose -f ./docker-compose.minio.yml up -d storage mongo createbuckets

Make sure that associated services are available on the localhost - e.g. mongo, minio

Start all the services in dev mode

yarn dev

Send new tests to dashboard using this command:

CYPRESS_API_URL=http://localhost:1234/ \
cy2 run --record --key whatever --parallel --ci-build-id `date +%s`

Prevent CI

Add [skip ci] to commit message to skip running CI.

Releasing a new version

We use semver standard.

Releasing latest tag

Pushing to master automatically created new docker images with latest tags

Releasing tagged version e.g. v1.0.0-beta.4

  1. Run yarn release to create a new release.

  2. Push to master. Push to master, together with tags git push origin master --tags. Pushing to master will trigger CI that will actually update dockerhub.

Pushing a properly formatted (semver) git tag starts release of dockerhub images tagged accordingly. E.g. v0.5.2 will release dockerhub tags v0, v0.5, v0.5.2.

The script does the following behind the scenes:

  • Update all package.json files (we release all together and do not increase / release individual packages version)

  • Commit with message, e.g. v0.5.2

  • Add git tag, e.g. git tag v0.5.2

Open to see the dashboard in action.

The dashboard should be available at

Director service should be available at

Every commit to master triggers , which builds new docker images, assign tags and pusher the new images to DockerHub.

After pushing a new tagged please go ahead and create a new Github with a summary and attributions.

http://localhost:8080
http://localhost:8080
http://localhost:1234
CI via GH Actions
release
GitHub Codespaces.
sorry-cypress/sorry-cypress
Creating sorry-cypress Codespace