Git Product home page Git Product logo

Comments (3)

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024 1

@asagarelse

Please post your GitHub Actions workflow.

from github-action.

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024 1

@asagarelse

Thank you for providing your GitHub Actions workflow, which shows that you are running Cypress on a self-hosted runner using a shell command. You are not using the Cypress JavaScript GitHub Action cypress-io/github-action:

runs-on: [self-hosted, ephemeral, '${{ inputs.RUNNER }}']
...
steps:
npx cypress run --spec 'cypress/e2e/features/${{ inputs.FEATURE }}.feature' --browser ${{ inputs.BROWSER }} -e StartAPP='${{ inputs.StartAPP }}',ENV='${{ inputs.ENV }}',RunFrom='CI'

This issue list is for reporting bugs in cypress-io/github-action or for enhancement requests to the action. It is not for general issues regarding using Cypress under GitHub Actions. Your problem belongs into the second category and so this issue needs to be closed.

I hope you can find somebody on Discord to help you. You might need to share the test code which is failing. Good luck!

from github-action.

asagarelse avatar asagarelse commented on September 7, 2024

Hello @MikeMcC399 , Thanks for the response, much appreciable!
Here is the GitHub Actions workflow *.yaml file

name: Run Feature Test
on:
  workflow_dispatch:
    inputs:
      ENV:
        type: choice
        description: 'Environment'
        required: true
        default: DEV
        options:
          - DEV
      RUNNER:
        type: choice
        description: runner
        required: true
        default: deploy-eks
        options:
          - self-hosted
          - ephemeral
          - deploy-eks
      FEATURE:
        type: choice
        description: feature to be run
        required: true
        options:
          - UserProfile
          - Users
      BROWSER:
        type: choice
        description: browser
        required: true
        headed: true
        default: chrome
        options:
          - chrome
          - electron
          - firefox
      StartAPP:
        type: choice
        description: Starting Application
        required: true
        default: app
        options:
          - app

jobs:
  cypress-test-run:
    name: Execute Test-${{ inputs.FEATURE }}
    runs-on: [self-hosted, ephemeral, '${{ inputs.RUNNER }}']
    container:
      image: cypress/included:13.10.0
      options: -u root -e AWS_STS_REGIONAL_ENDPOINTS -e AWS_DEFAULT_REGION -e AWS_REGION -e AWS_ROLE_ARN -e AWS_WEB_IDENTITY_TOKEN_FILE
      volumes:
        - /var/run//test/123/secrets/eks.amazonaws.com/serviceaccount:/var/run/test/123/secrets/eks.amazonaws.com/serviceaccount

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Get AWS Secrets
        id: secrets
        uses: ./.github/actions/fetchAWS-Secrets

      - name: Build and Run Tests
        shell: bash
        run: |
          export $SECRETS_ENV

          npm ci
          npx cypress run --spec 'cypress/e2e/features/${{ inputs.FEATURE }}.feature' --browser ${{ inputs.BROWSER }} -e StartAPP='${{ inputs.StartAPP }}',ENV='${{ inputs.ENV }}',RunFrom='CI'

      - name: Upload json
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: json-report-${{ inputs.FEATURE }}
          path: |
            cypress/cucumber-json/${{ inputs.FEATURE }}.cucumber.json
            cypress/screenshots/

  generateReport:
    name: Generate HTML Report
    needs: cypress-test-run
    if: always()
    runs-on: ${{ inputs.RUNNER }}
    container:
      image: cypress/included:13.6.0
      options: -u root -e AWS_STS_REGIONAL_ENDPOINTS -e AWS_DEFAULT_REGION -e AWS_REGION -e AWS_ROLE_ARN -e AWS_WEB_IDENTITY_TOKEN_FILE
      volumes:
        - /var/run/secrets/eks.amazonaws.com/serviceaccount:/var/run/secrets/eks.amazonaws.com/serviceaccount

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setting Permissions
        run: |
          chmod -R a+rwx /__w/app/app
          npm ci

      - uses: actions/download-artifact@v4
        with:
          path: /__w/app/app/cypress/cucumber-json

      - name: Display structure of downloaded files
        run: ls -R

      - name: Generate Report
        uses: ./.github/actions/generate-Report

from github-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.