Skip to content

Commit

Permalink
Added tests for js callgraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
dannykim-endor committed Oct 24, 2024
1 parent 3cfa6f9 commit 72e2c88
Show file tree
Hide file tree
Showing 55 changed files with 2,658 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/endorlabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
NAMESPACE=$(jq -r '.inputs.tenant_name' $GITHUB_EVENT_PATH)
echo "::add-mask::$NAMESPACE"
echo NAMESPACE=$NAMESPACE >> $GITHUB_ENV
echo ENDOR_JS_ENABLE_TSSERVER=true >> $GITHUB_ENV
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -53,3 +54,17 @@ jobs:
scan_secrets: "true"
scan_git_logs: "true"
additional_args: "--as-default-branch --api=${{ github.event.inputs.api }} >> json.txt & cat json.txt"

- name: Endor Labs Call Graph Generation
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: endorlabs/github-action@e4ee275237b23c0071efa2e3966654ee64880a90
with:
namespace: ${{ github.event.inputs.tenant_name }}
scan_summary_output_type: "table"
# pr: "false"
enable_github_action_token: "true"
scan_dependencies: "true"
log_level: "debug"
# scan_secrets: "true"
# scan_git_logs: "true"
additional_args: "--call-graph-languages=javascript,typescript >> json.txt & cat json.txt"
20 changes: 20 additions & 0 deletions benchmark/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
load("//:src/golang/bazel/def.bzl", "go_test")

go_test(
name = "benchmark_test",
srcs = ["benchmark_test.go"],
data = [
"//src/golang/internal.endor.ai/service/endorctl/plugin/jsplugin/benchmark/custom",
],
deps = [
"//spec/internal/endor/v1:endor",
"//src/golang/internal.endor.ai/pkg/callgraphs",
"//src/golang/internal.endor.ai/pkg/datastructures",
"//src/golang/internal.endor.ai/pkg/functionrefs",
"//src/golang/internal.endor.ai/service/endorctl/logger",
"//src/golang/internal.endor.ai/service/endorctl/plugin/jsplugin/client",
"//src/golang/internal.endor.ai/service/endorctl/plugin/pluginclient",
"@com_github_stretchr_testify//assert",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)
Loading

0 comments on commit 72e2c88

Please sign in to comment.