Giter Club home page Giter Club logo

Comments (4)

goldy1992 avatar goldy1992 commented on June 8, 2024

Can you please advise on how I should build so the test do not fail.

from gradle-semantic-release-plugin.

KengoTODA avatar KengoTODA commented on June 8, 2024

Tests are not designed for Windows. We need to run it on Linux, macOS, or other OS.

 Error: spawn ./gradlew ENOENT

This message means that it could not found the file named ./gradlew because Windows uses \ as a file separator.
I'm not so sure how Git bash is working. WSL2 would be better to build the project.

from gradle-semantic-release-plugin.

goldy1992 avatar goldy1992 commented on June 8, 2024

Thanks for your help @KengoTODA
Running on WSL2 seems to resolve the ENOENT issue so that's good...

However the same tests seem to be failing but for a different reason:

:~/originalDir/gradle-semantic-release-plugin$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 987 packages from 1147 contributors and audited 989 packages in 11.431s

54 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
~/originalDir/gradle-semantic-release-plugin$ npm test

> [email protected] test /home/mgoldsmith/originalDir/gradle-semantic-release-plugin
> cross-env TS_NODE_FILES=true nyc mocha



  Test for gradle handling
    ✓ getCommand() return 'gradle' when there is no gradle wrapper
    ✓ getCommand() can find the wrapper script
    1) getTaskToPublish() return empty string when there is no task to publish
    2) getTaskToPublish() return 'publish' when there is maven-publish-plugin
    3) getTaskToPublish() return 'uploadArchives' when there is available legacy publishing method
    4) getTaskToPublish() return 'artifactoryDeploy' when there is available artifactory-plugin
    5) getTaskToPublish() return 'publishPlugins' when there is available plugin-publish-plugin
    6) getVersion() returns version defined in build.gradle
    7) getVersion() returns version defined in gradle.properties
    publishArtifact()
      8) runs 'publish' task
    buildOptions()
      ✓ returns an empty array
      ✓ adds project properties when specific there is envvar

  index
    ✓ prepare is a function
    ✓ publish is a function
    ✓ verifyConditions is a function

  Test for prepare step
    ✓ updateVersion() will update version in gradle.properties

  Test for prepare step without gradle.properties
    ✓ updateVersion() will create gradle.properties with specified version


  9 passing (1m)
  8 failing

  1) Test for gradle handling
       getTaskToPublish() return empty string when there is no task to publish:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:11:65)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  2) Test for gradle handling
       getTaskToPublish() return 'publish' when there is maven-publish-plugin:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:11:65)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  3) Test for gradle handling
       getTaskToPublish() return 'uploadArchives' when there is available legacy publishing method:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:11:65)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  4) Test for gradle handling
       getTaskToPublish() return 'artifactoryDeploy' when there is available artifactory-plugin:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:11:65)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  5) Test for gradle handling
       getTaskToPublish() return 'publishPlugins' when there is available plugin-publish-plugin:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:11:65)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  6) Test for gradle handling
       getVersion() returns version defined in build.gradle:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:15:1046)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  7) Test for gradle handling
       getVersion() returns version defined in gradle.properties:
     Error: Unexpected error: Gradle failed with status code 1
      at ChildProcess.child.on.code (src/gradle.ts:15:1046)
      at ChildProcess.EventEmitter.emit (domain.js:448:20)
      at maybeClose (internal/child_process.js:982:16)
      at Socket.stream.socket.on (internal/child_process.js:389:11)
      at Socket.EventEmitter.emit (domain.js:448:20)
      at Pipe._handle.close (net.js:607:12)

  8) Test for gradle handling
       publishArtifact()
         runs 'publish' task:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mgoldsmith/originalDir/gradle-semantic-release-plugin/test/src/gradle.test.ts)




npm ERR! Test failed.  See above for more details.

from gradle-semantic-release-plugin.

goldy1992 avatar goldy1992 commented on June 8, 2024

Actually just check the github action on my forked repo and it's now passing no closing this issue... thanks for the clarification!!

from gradle-semantic-release-plugin.

Related Issues (19)

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.