Skip to content

Conversation

@JasonLandbridge
Copy link
Contributor

This is attempt 2: #5231

I have ensured the Cypress runs as part of the CI with a Cypress test that displays the plugin working

Plugin link: Cypress-SignalR-Mock

Before submitting your plugin, please check to see if it fulfills these requirements:

  • 🚀 Works with the latest major version of Cypress
  • 🛠 Plugin purpose is clearly documented (in a README or docs website)
  • 📝 Well-written documentation - A great example (link)
  • 🔬 Tested using Cypress - tests using Cypress can act as both example usage and test coverage
  • 👷‍♀️ CI pipeline that's passing (CircleCI and Github Actions are both free for Open Source)

If you have reason to believe your plugin does not need to meet certain requirements, please feel free to provide justification below:

@netlify
Copy link

netlify bot commented Jul 17, 2023

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ddd141d

@netlify
Copy link

netlify bot commented Jul 17, 2023

Deploy Preview for benevolent-cat-040f48 ready!

Name Link
🔨 Latest commit ddd141d
🔍 Latest deploy log https://app.netlify.com/sites/benevolent-cat-040f48/deploys/64bec20c89c5c4000872488c
😎 Deploy Preview https://deploy-preview-5378--benevolent-cat-040f48.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor

@JasonLandbridge

Could you please explain how your CI automatically tests?

It looks like the tests are in the workflow https://github.com/JasonLandbridge/Cypress-SignalR-Mock/blob/master/.github/workflows/test.yml which is triggered by pull_request however if I look at the commit history you are mostly pushing to the master branch without using PRs, so the test doesn't run in this case.

You may need to add an event trigger

  push:
    branches:
      - 'master'

@JasonLandbridge
Copy link
Contributor Author

@MikeMcC399, that was only to fix the workflow files, which i got recently working. Normally any changes will happen through a PR, as can be seen here: JasonLandbridge/Cypress-SignalR-Mock#5

I will change the repo setting that direct pushes are not possible anymore

@MikeMcC399
Copy link
Contributor

@JasonLandbridge

I will change the repo setting that direct pushes are not possible anymore
Thanks for your reply!

I also noticed in your workflow (https://github.com/JasonLandbridge/Cypress-SignalR-Mock/blob/master/.github/workflows/test.yml) that some steps are repeated and could be optimized. (This is not anything to stop accepting your plugin. I just wanted to mention it for your benefit.)

  • cypress-io/github-action@v5 automatically includes the call npm ci so if you also include that in build: npm ci && npm run build you are running it twice.
  • cypress-io/github-action@v5 will effectively and automatically execute the equivalent of npx cypress run so again, if you call npm run cypress:ci (defined as "cypress:ci": "start-server-and-test 'nuxi dev --port 3030 --dotenv .env.cypress' http://localhost:3030 cypress:run"), then you are running the Cypress tests twice.

cypress-io/github-action has documentation and examples in the repo to assist.

name: Run Unit and Cypress Tests

on:
  pull_request:
    branches: [ master ]
    paths-ignore:
      - '.github/**'
      - '.idea/**'
      - '.run/**'
      - '.vscode/**'
jobs:
  Testing:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [ 16.x ]

    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'
      - name: NPM Clean Install
        run: npm ci
      - name: Execute Unit tests
        run: npm run test
      - name: Execute Typechecking
        run: npm run type-check
      - name: Cypress run
        uses: cypress-io/github-action@v5
        with:
          build: npm ci && npm run build
          start: npm run cypress:ci
          working-directory: ./playground

@jaffrepaul jaffrepaul merged commit c8a1755 into cypress-io:main Jul 24, 2023
@JasonLandbridge
Copy link
Contributor Author

@MikeMcC399 , Thank you very much for that extensive feedback! I will make sure to correct it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants