diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4716cf4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build_test_main: + name: Build and test (main repository) + runs_on: ${{ matrix.os }} + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: bazelisk build //... + + - name: Test + run: bazelisk test //... + + build_test_test: + name: Build and test (test repository) + runs_on: ${{ matrix.os }} + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Build + working-directory: test + run: bazelisk build //... + + - name: Test + working-directory: test + run: bazelisk test //... diff --git a/test/WORKSPACE b/test/WORKSPACE index 004c72c..28a194f 100644 --- a/test/WORKSPACE +++ b/test/WORKSPACE @@ -19,4 +19,13 @@ jvm_maven_import_external( server_urls = ["https://repo.maven.apache.org/maven2"], ) +jvm_maven_import_external( + name = "org_twitter4j_twitter4j_core", + artifact = "org.twitter4j:twitter4j-core:4.0.7", + artifact_sha256 = "f3d28049f1c13752c2ea71397fdcda8d9723cf315e7101502997fddfe9aad66d", + server_urls = ["https://repo.maven.apache.org/maven2"], +) + jar_jar_repositories() + +register_toolchains("//jar_jar_aspect:jar_jar_toolchain") diff --git a/test/example/BUILD b/test/jar_jar/example/BUILD similarity index 100% rename from test/example/BUILD rename to test/jar_jar/example/BUILD diff --git a/test/example/UseFoo.java b/test/jar_jar/example/UseFoo.java similarity index 100% rename from test/example/UseFoo.java rename to test/jar_jar/example/UseFoo.java diff --git a/test/example/shade_rule b/test/jar_jar/example/shade_rule similarity index 100% rename from test/example/shade_rule rename to test/jar_jar/example/shade_rule diff --git a/test/inline_example/BUILD b/test/jar_jar/inline_example/BUILD similarity index 100% rename from test/inline_example/BUILD rename to test/jar_jar/inline_example/BUILD diff --git a/test/inline_example/UseFoo.java b/test/jar_jar/inline_example/UseFoo.java similarity index 100% rename from test/inline_example/UseFoo.java rename to test/jar_jar/inline_example/UseFoo.java diff --git a/test_aspect/BUILD b/test/jar_jar_aspect/BUILD similarity index 100% rename from test_aspect/BUILD rename to test/jar_jar_aspect/BUILD diff --git a/test_aspect/example/BUILD b/test/jar_jar_aspect/example/BUILD similarity index 100% rename from test_aspect/example/BUILD rename to test/jar_jar_aspect/example/BUILD diff --git a/test_aspect/example/UseFoo.java b/test/jar_jar_aspect/example/UseFoo.java similarity index 100% rename from test_aspect/example/UseFoo.java rename to test/jar_jar_aspect/example/UseFoo.java diff --git a/test_aspect/example/UseUseUnshadedFoo.java b/test/jar_jar_aspect/example/UseUseUnshadedFoo.java similarity index 100% rename from test_aspect/example/UseUseUnshadedFoo.java rename to test/jar_jar_aspect/example/UseUseUnshadedFoo.java diff --git a/test_aspect/shade_rule b/test/jar_jar_aspect/shade_rule similarity index 100% rename from test_aspect/shade_rule rename to test/jar_jar_aspect/shade_rule diff --git a/test_aspect/WORKSPACE b/test_aspect/WORKSPACE deleted file mode 100644 index 15adeb5..0000000 --- a/test_aspect/WORKSPACE +++ /dev/null @@ -1,24 +0,0 @@ -workspace(name = "test_aspect") - -load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") - -local_repository( - name = "com_github_johnynek_bazel_jar_jar", - path = "../", -) - -load( - "@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", - "jar_jar_repositories", -) - -jvm_maven_import_external( - name = "org_twitter4j_twitter4j_core", - artifact = "org.twitter4j:twitter4j-core:4.0.7", - artifact_sha256 = "f3d28049f1c13752c2ea71397fdcda8d9723cf315e7101502997fddfe9aad66d", - server_urls = ["https://repo.maven.apache.org/maven2"], -) - -jar_jar_repositories() - -register_toolchains("//:jar_jar_toolchain")