0

I downloaded latest NodeJS application and using Cypress 9.7.0 . Below are the steps I followed: 1.Proxy Set Up 2.npm install 3.used npx cypress-ntlm open/run

It's working on the runner server, but when trying using yml file to execute CI/CD steps it fails with below error Error: The cypress-ntlm-auth plugin must be loaded before using this method

Yml File name: (PUSH) Test123 on: push: branches: [ branchname] jobs: cypress-run: name: Cypress automation runs-on: runnerid if: "!contains(github.event.head_commit.message, 'skip ci')" steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }}

   - name: Set Intel Proxy
     run: |
            npm config set https-proxy http://domain.company.com:911
            npm config set proxy http://domain.company.com:912
            npm config set strict-ssl false 
            
   - name: Checkout
     uses: actions/checkout@v3
    
   - name: Cypress execution part
     uses: cypress-io/github-action@v5
     with:  
      working-directory: Cypress
prahlad
  • 1
  • 2

1 Answers1

0

I had similar problem. My solution was:

  - name: Cypress run
    run: |
      export HTTP_PROXY=${{ vars.HTTP_PROXY }}
      export HTTPS_PROXY=${{ vars.HTTPS_PROXY }}
      export NO_PROXY=${{ vars.NO_PROXY }}
      npx cypress-ntlm run --spec ... 

I tried cypress-io/github-action@v5, but it run npx cypress run and not cypress-ntlm run. I tried this: (but I was not successfull without setting proxy variables)

- name: Cypress run
    uses: cypress-io/github-action@v5
    with:
      spec: ...
      command: npx cypress-ntlm run
      browser: electron

(https://github.com/cypress-io/cypress/issues/23704)