Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add tests for examples #1271

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Dec 31, 2024

Issue

There is no automated testing available for the set of examples in the examples directory.

Change

  • Add a test script scripts/test.sh for each of the sub-directories of the examples directory
  • Add a examples/test-all-examples.sh script to run all the above scripts
  • Add a GitHub Actions workflow to run each of the individual test scripts

Verification

Local test

On Ubuntu 24.04.1 LTS, Node.js 22.12.0 LTS with Docker Desktop 4.37.1

git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images
cd examples
./test-all-examples.sh

GitHub Actions test

Under https://github.com/cypress-io/cypress-docker-images/actions run workflow
"Example Tests"

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 added type: enhancement example 💎 Need to create a good example labels Dec 31, 2024
@MikeMcC399 MikeMcC399 self-assigned this Dec 31, 2024
@MikeMcC399 MikeMcC399 marked this pull request as ready for review December 31, 2024 15:21
@jennifer-shehane
Copy link
Member

I'll add these as required status checks. Thanks!

@jennifer-shehane jennifer-shehane merged commit 31d5a60 into cypress-io:master Jan 2, 2025
38 checks passed
@MikeMcC399
Copy link
Collaborator Author

@jennifer-shehane

I'll add these as required status checks. Thanks!

I wasn't sure if you would want to add them as required checks, as the examples aren't essential for publication of the Cypress Docker images themselves. The actual Cypress Docker images are already fully tested in CircleCI.

You could leave the status of the GitHub workflow as information only for the moment, not required. This could be changed later if it is thought that the tests are indeed essential.

@MikeMcC399 MikeMcC399 deleted the add/test-examples branch January 2, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example 💎 Need to create a good example type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants