Skip to content

Commit

Permalink
add mavenTestSteps
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed Jan 6, 2025
1 parent 2e11ef2 commit 0caa5d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/GitHubActionJava.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ function gradleTestSteps(taskString: String(!isEmpty)?, workingDirectory: String
`working-directory` = workingDirectory
}
}

function mavenTestSteps(taskString: String(!isEmpty)?, workingDirectory: String?, distribution: String?, javaVersion: String?): Listing<GitHubAction.Step> = new {
new {
uses = "actions/checkout@v4"
}

setupJava(distribution, javaVersion, "maven")

new {
run = "./mvnw \(taskString ?? "test")"
`working-directory` = workingDirectory
}
}
4 changes: 2 additions & 2 deletions src/PklProject
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package {
"James Ward <james@jamesward.com>"
}
version = read?("env:VERSION")?.replaceFirst("\(name)@", "") ?? "0.0.1-SNAPSHOT"
baseUri = "package://jamesward.github.com/pklgha"
baseUri = "package://pkg.pkl-lang.org/github.com/jamesward/pklgha"
packageZipUrl = "https://github.com/jamesward/pklgha/releases/download/\(name)@\(version)/\(name)@\(version).zip"
sourceCode = "https://github.com/jamesward/pklgha"
sourceCodeUrlScheme = "\(sourceCode)/blob/\(name)@\(version)%{path}#L%{line}-L%{endLine}"
sourceCodeUrlScheme = "\(sourceCode)/blob/\(name)@\(version)/src%{path}#L%{line}-L%{endLine}"
documentation = "https://jamesward.github.io/pklgha"
license = "Apache-2.0"
description = """
Expand Down

0 comments on commit 0caa5d4

Please sign in to comment.