diff --git a/.github/workflows/test-pull-request-java-akka.yml b/.github/workflows/test-pull-request-java-akka.yml new file mode 100644 index 00000000..e97c201b --- /dev/null +++ b/.github/workflows/test-pull-request-java-akka.yml @@ -0,0 +1,29 @@ +name: Test Pull Request (Akka) + +on: + merge_group: + pull_request: + branches: + - main + paths: + - java/akka/** + +jobs: + smoke: + name: Smoke Tests + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.18.x + + - name: Checkout + uses: actions/checkout@v4 + + - name: Test Java Samples + run: | + ./scripts/smoke.sh --suite java/akka/smoke_test \ + --builder paketobuildpacks/builder:full \ + --builder paketobuildpacks/builder:base \ + --builder paketobuildpacks/builder:tiny diff --git a/java/akka_test.go b/java/akka/smoke_test/akka_test.go similarity index 92% rename from java/akka_test.go rename to java/akka/smoke_test/akka_test.go index dc109f5d..3dc4b23f 100644 --- a/java/akka_test.go +++ b/java/akka/smoke_test/akka_test.go @@ -1,7 +1,9 @@ -package java_test +package akka_test import ( + "flag" "fmt" + "github.com/paketo-buildpacks/samples/tests" "os" "path/filepath" "strings" @@ -16,6 +18,12 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" ) +var builders tests.BuilderFlags + +func init() { + flag.Var(&builders, "name", "the name a builder to test with") +} + func TestAkka(t *testing.T) { Expect := NewWithT(t).Expect @@ -88,7 +96,7 @@ func testAkkaWithBuilder(builder string) func(*testing.T, spec.G, spec.S) { } var err error - source, err = occam.Source(filepath.Join("../java", "akka")) + source, err = occam.Source(filepath.Join("../../", "akka")) Expect(err).NotTo(HaveOccurred()) var logs fmt.Stringer