Skip to content

reminia/sbt-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-curl ci

sbt-curl is a sbt plugin to run curl commands in sbt.
The motivation is to learn sbt by doing and then I came up with this idea.
With this plugin, you can test your api by curl command within sbt.

Features

  • Run curl command directly in sbt, like > curl www.google.com.
  • Run a file of curl commands, try sbt curlTest, it will execute the curl-test script defined. See the example.

TBD: maybe add eDSl to support test api with curl / expect command.

Usage

Add the plugin:

resolvers += Resolver.url("GitHub Package Registry", url("https://maven.pkg.github.com/reminia/_"))(
  Resolver.ivyStylePatterns
)
credentials += Credentials(
  "GitHub Package Registry",
  "maven.pkg.github.com",
  "_",
  System.getenv("GITHUB_TOKEN")
)
addSbtPlugin("me.yceel" % "sbt-curl" % "0.1.1")

You can:

  • run curl command directly in your sbt REPL.
  • run curlTest to execute all curl commands in the curl-script.
    Curl script is a file named curl-script or curl-test under root directory or root/project directory.

Check the project api for reference.