Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Oct 22, 2024
1 parent 6b1a999 commit 99caf48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Run tests
run: |
set -eux
./mill -ij1 --disable-ticker __.testLocal
./mill -ikj1 --disable-ticker __.testLocal
publish-sonatype:
if: github.repository == 'com-lihaoyi/cask' && contains(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion example/staticFiles/app/src/StaticFiles.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object StaticFiles extends cask.MainRoutes{
}

@cask.staticFiles("/static/file")
def staticFileRoutes() = "app/resources/cask"
def staticFileRoutes() = "resources/cask"

@cask.staticResources("/static/resource")
def staticResourceRoutes() = "cask"
Expand Down
8 changes: 5 additions & 3 deletions example/staticFiles/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package build.example.staticFiles
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{
trait AppModule extends CrossScalaModule{ app =>

def moduleDeps = Seq(build.cask(crossScalaVersion))

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath
def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Expand All @@ -16,7 +16,9 @@ trait AppModule extends CrossScalaModule{
ivy"com.lihaoyi::requests::0.8.0",
)

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath

def testSandboxWorkingDir = false

// redirect this to the forked `test` to make sure static file serving works
def testLocal(args: String*) = T.command{
Expand Down
8 changes: 5 additions & 3 deletions example/staticFiles2/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package build.example.staticFiles2
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{
trait AppModule extends CrossScalaModule{ app =>

def moduleDeps = Seq(build.cask(crossScalaVersion))

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath
def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Expand All @@ -16,7 +16,9 @@ trait AppModule extends CrossScalaModule{
ivy"com.lihaoyi::requests::0.8.0",
)

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath

def testSandboxWorkingDir = false

// redirect this to the forked `test` to make sure static file serving works
def testLocal(args: String*) = T.command{
Expand Down

0 comments on commit 99caf48

Please sign in to comment.