Skip to content

Commit 2b5e79c

Browse files
committed
- Adds an integration test
- Incorporates changes from #69
1 parent ccdcdcc commit 2b5e79c

35 files changed

+1384
-30
lines changed

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
try-import user.bazelrc
2+
3+
test --test_output=errors
4+

.clang-format

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,118 @@ SpacesInSquareBrackets: false
228228
Standard: Auto
229229
TabWidth: 8
230230
UseTab: Never
231+
---
232+
Language: Java
233+
# BasedOnStyle: Google
234+
AccessModifierOffset: -1
235+
AlignAfterOpenBracket: DontAlign
236+
AlignConsecutiveAssignments: false
237+
AlignConsecutiveDeclarations: false
238+
AlignEscapedNewlines: Left
239+
AlignOperands: false
240+
AlignTrailingComments: false
241+
AllowAllParametersOfDeclarationOnNextLine: true
242+
AllowShortBlocksOnASingleLine: false
243+
AllowShortCaseLabelsOnASingleLine: false
244+
AllowShortFunctionsOnASingleLine: Empty
245+
AllowShortIfStatementsOnASingleLine: false
246+
AllowShortLoopsOnASingleLine: true
247+
AlwaysBreakAfterDefinitionReturnType: None
248+
AlwaysBreakAfterReturnType: None
249+
AlwaysBreakBeforeMultilineStrings: false
250+
AlwaysBreakTemplateDeclarations: true
251+
BinPackArguments: true
252+
BinPackParameters: true
253+
BraceWrapping:
254+
AfterClass: false
255+
AfterControlStatement: false
256+
AfterEnum: false
257+
AfterFunction: false
258+
AfterNamespace: false
259+
AfterObjCDeclaration: false
260+
AfterStruct: false
261+
AfterUnion: false
262+
AfterExternBlock: false
263+
BeforeCatch: false
264+
BeforeElse: false
265+
IndentBraces: false
266+
SplitEmptyFunction: true
267+
SplitEmptyRecord: true
268+
SplitEmptyNamespace: true
269+
BreakBeforeBinaryOperators: NonAssignment
270+
BreakBeforeBraces: Attach
271+
BreakBeforeInheritanceComma: false
272+
BreakBeforeTernaryOperators: true
273+
BreakConstructorInitializersBeforeComma: false
274+
BreakConstructorInitializers: BeforeColon
275+
BreakAfterJavaFieldAnnotations: false
276+
BreakStringLiterals: true
277+
ColumnLimit: 100
278+
CommentPragmas: '^ IWYU pragma:'
279+
CompactNamespaces: false
280+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
281+
ConstructorInitializerIndentWidth: 4
282+
ContinuationIndentWidth: 4
283+
Cpp11BracedListStyle: true
284+
DerivePointerAlignment: true
285+
DisableFormat: false
286+
ExperimentalAutoDetectBinPacking: false
287+
FixNamespaceComments: true
288+
ForEachMacros:
289+
- foreach
290+
- Q_FOREACH
291+
- BOOST_FOREACH
292+
IncludeBlocks: Preserve
293+
IncludeCategories:
294+
- Regex: '^<ext/.*\.h>'
295+
Priority: 2
296+
- Regex: '^<.*\.h>'
297+
Priority: 1
298+
- Regex: '^<.*'
299+
Priority: 2
300+
- Regex: '.*'
301+
Priority: 3
302+
IncludeIsMainRegex: '([-_](test|unittest))?$'
303+
IndentCaseLabels: true
304+
IndentPPDirectives: None
305+
IndentWidth: 2
306+
IndentWrappedFunctionNames: false
307+
JavaScriptQuotes: Leave
308+
JavaScriptWrapImports: true
309+
KeepEmptyLinesAtTheStartOfBlocks: false
310+
MacroBlockBegin: ''
311+
MacroBlockEnd: ''
312+
MaxEmptyLinesToKeep: 1
313+
NamespaceIndentation: None
314+
ObjCBlockIndentWidth: 2
315+
ObjCSpaceAfterProperty: false
316+
ObjCSpaceBeforeProtocolList: false
317+
PenaltyBreakAssignment: 2
318+
PenaltyBreakBeforeFirstCallParameter: 1
319+
PenaltyBreakComment: 300
320+
PenaltyBreakFirstLessLess: 120
321+
PenaltyBreakString: 1000
322+
PenaltyExcessCharacter: 1000000
323+
PenaltyReturnTypeOnItsOwnLine: 200
324+
PointerAlignment: Left
325+
#RawStringFormats:
326+
# - Delimiter: pb
327+
# Language: TextProto
328+
# BasedOnStyle: google
329+
ReflowComments: true
330+
SortIncludes: true
331+
SortUsingDeclarations: true
332+
SpaceAfterCStyleCast: true
333+
SpaceAfterTemplateKeyword: true
334+
SpaceBeforeAssignmentOperators: true
335+
SpaceBeforeParens: ControlStatements
336+
SpaceInEmptyParentheses: false
337+
SpacesBeforeTrailingComments: 1
338+
SpacesInAngles: false
339+
SpacesInContainerLiterals: true
340+
SpacesInCStyleCastParentheses: false
341+
SpacesInParentheses: false
342+
SpacesInSquareBrackets: false
343+
Standard: Auto
344+
TabWidth: 8
345+
UseTab: Never

.github/workflows/ci.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
13-
- name: Install bazel pre-reqs
14-
run: sudo apt install pkg-config zip g++ zlib1g-dev unzip python3
13+
- name: Install deps
14+
run: |
15+
sudo apt install -y \
16+
pkg-config \
17+
zip \
18+
g++\
19+
zlib1g-dev \
20+
unzip \
21+
python3 \
22+
apt-transport-https \
23+
ca-certificates \
24+
curl \
25+
gnupg-agent \
26+
software-properties-common
1527
- name: Install bazelisk
1628
run: |
1729
wget https://github.com/philwo/bazelisk/archive/$BAZELISK_VERSION.tar.gz -O $BAZELISK_ARCHIVE
@@ -22,6 +34,14 @@ jobs:
2234
env:
2335
BAZELISK_ARCHIVE: /tmp/bazelisk.tar.gz
2436
BAZELISK_VERSION: 8ec9f17a32c6d44abc2dbfb4a86b6b9d559253d0
37+
- name: Install envoy
38+
run: |
39+
curl -sL 'https://getenvoy.io/gpg' | sudo apt-key add -
40+
sudo add-apt-repository \
41+
"deb [arch=amd64] https://dl.bintray.com/tetrate/getenvoy-deb $(lsb_release -cs) stable"
42+
sudo apt-get update && sudo apt-get install -y getenvoy-envoy
43+
which envoy
44+
envoy --version
2545
- name: Build
2646
run: bazel build //...:all
2747
- name: Test

WORKSPACE

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@ workspace(
44

55
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
66

7+
http_archive(
8+
name = "build_bazel_rules_nodejs",
9+
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
10+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
11+
)
12+
13+
http_archive(
14+
name = "com_github_grpc_grpc",
15+
sha256 = "950348037825ce013606f5b5b4291fc1d32f79e3c0437747af41813743aa5db8",
16+
strip_prefix = "grpc-3990d9ce9e796abed897517994b3c93598b9525a",
17+
urls = [
18+
"https://github.com/grpc/grpc/archive/3990d9ce9e796abed897517994b3c93598b9525a.tar.gz",
19+
],
20+
)
21+
22+
http_archive(
23+
name = "io_grpc_grpc_java",
24+
sha256 = "233cb87bdfde16602b446a655d204b56772f2395ebf0a5dfa8c4500893adc7f9",
25+
strip_prefix = "grpc-java-57bc1910e4b23220e6a4b1f0f9326e5347e2ec41",
26+
urls = ["https://github.com/grpc/grpc-java/archive/57bc1910e4b23220e6a4b1f0f9326e5347e2ec41.tar.gz"],
27+
)
28+
29+
http_archive(
30+
name = "rules_jvm_external",
31+
sha256 = "02e33287aa6fa129be0a3569ddba0c84ef8eb8b1e5f6f5348373bee559447642",
32+
strip_prefix = "rules_jvm_external-05ba43aa5b671269cf0dfe2f91ec8f26dcea998e",
33+
url = "https://github.com/bazelbuild/rules_jvm_external/archive/05ba43aa5b671269cf0dfe2f91ec8f26dcea998e.tar.gz",
34+
)
35+
736
http_archive(
837
name = "rules_proto",
938
sha256 = "4d421d51f9ecfe9bf96ab23b55c6f2b809cbaf0eea24952683e397decfbd0dd0",
@@ -14,11 +43,51 @@ http_archive(
1443
)
1544

1645
http_archive(
17-
name = "build_bazel_rules_nodejs",
18-
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
19-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
46+
name = "io_bazel_rules_sass",
47+
sha256 = "e1af475dacad99c675042fcb3bf15dfaa197a3759821f0244f1b210d4f04d468",
48+
strip_prefix = "rules_sass-1.24.0",
49+
url = "https://github.com/bazelbuild/rules_sass/archive/1.24.0.tar.gz",
50+
)
51+
52+
http_archive(
53+
name = "io_bazel_rules_webtesting",
54+
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
55+
urls = [
56+
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz",
57+
],
58+
)
59+
60+
###################################################################################################
61+
62+
load("@rules_jvm_external//:defs.bzl", "maven_install")
63+
load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "RULES_WEBTESTING_ARTIFACTS")
64+
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS")
65+
66+
maven_install(
67+
artifacts = [
68+
"com.google.code.gson:gson:2.8.5",
69+
"com.google.guava:guava:28.2-jre",
70+
"com.google.truth:truth:0.42",
71+
"com.google.truth.extensions:truth-java8-extension:0.42",
72+
"io.netty:netty-tcnative-boringssl-static:2.0.25.Final",
73+
"junit:junit:4.13-beta-1",
74+
"net.bytebuddy:byte-buddy:1.8.22",
75+
"org.seleniumhq.selenium:selenium-api:3.141.59",
76+
"org.seleniumhq.selenium:selenium-remote-driver:3.141.59",
77+
"org.seleniumhq.selenium:selenium-support:3.141.59",
78+
] + RULES_WEBTESTING_ARTIFACTS + IO_GRPC_GRPC_JAVA_ARTIFACTS,
79+
generate_compat_repositories = True,
80+
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
81+
repositories = [
82+
"https://jcenter.bintray.com/",
83+
"https://maven.google.com",
84+
"https://repo1.maven.org/maven2",
2085
)
2186

87+
load("@maven//:compat.bzl", "compat_repositories")
88+
89+
compat_repositories()
90+
2291
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
2392

2493
rules_proto_dependencies()
@@ -29,6 +98,14 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
2998

3099
protobuf_deps()
31100

101+
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
102+
103+
grpc_deps()
104+
105+
load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
106+
107+
grpc_java_repositories()
108+
32109
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
33110

34111
yarn_install(
@@ -37,6 +114,12 @@ yarn_install(
37114
yarn_lock = "//:yarn.lock",
38115
)
39116

117+
yarn_install(
118+
name = "test_npm",
119+
package_json = "//test:package.json",
120+
yarn_lock = "//test:yarn.lock",
121+
)
122+
40123
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
41124

42125
install_bazel_dependencies()
@@ -60,3 +143,7 @@ ts_setup_workspace()
60143
load("@rules_typescript_proto//:index.bzl", "rules_typescript_proto_dependencies")
61144

62145
rules_typescript_proto_dependencies()
146+
147+
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
148+
149+
sass_repositories()

package.json

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,46 @@
44
"repository": "https://github.com/Dig-Doug/rules_typescript_proto",
55
"license": "Apache-2.0",
66
"dependencies": {
7+
"@angular/animations": "8.2.3",
8+
"@angular/common": "8.2.3",
9+
"@angular/core": "8.2.3",
10+
"@angular/platform-browser": "8.2.3",
11+
"@angular/platform-browser-dynamic": "8.2.3",
712
"google-protobuf": "3.12.2"
13+
"rxjs": "6.5.3",
14+
"systemjs": "6.1.2",
15+
"zone.js": "0.10.2"
816
},
917
"devDependencies": {
18+
"@angular/bazel": "9.0.0",
19+
"@angular/cli": "8.3.10",
20+
"@angular/compiler": "8.2.3",
21+
"@angular/compiler-cli": "8.2.3",
1022
"@bazel/jasmine": "1.7.0",
1123
"@bazel/karma": "1.7.0",
1224
"@bazel/rollup": "1.7.0",
1325
"@bazel/typescript": "1.7.0",
26+
"@babel/cli": "7.6.0",
27+
"@babel/core": "7.6.0",
28+
"@babel/preset-env": "7.6.0",
29+
"@bazel/hide-bazel-files": "1.4.1",
30+
"@bazel/jasmine": "1.4.1",
31+
"@bazel/karma": "1.4.1",
32+
"@bazel/rollup": "1.4.1",
33+
"@bazel/terser": "1.4.1",
34+
"@bazel/typescript": "1.4.1",
1435
"@improbable-eng/grpc-web": "0.12.0",
36+
"@rollup/plugin-commonjs": "11.0.0",
37+
"@rollup/plugin-node-resolve": "6.0.0",
1538
"@types/google-protobuf": "3.7.2",
1639
"@types/jasmine": "3.5.9",
40+
"babelify": "^10.0.0",
1741
"clang-format": "1.4.0",
42+
"core-js": "2.6.9",
43+
"history-server": "1.3.1",
1844
"husky": "4.2.5",
1945
"karma": "5.0.1",
46+
"html-insert-assets": "0.4.0",
2047
"karma-chrome-launcher": "3.1.0",
2148
"karma-firefox-launcher": "1.3.0",
2249
"karma-jasmine": "3.3.1",
@@ -25,13 +52,13 @@
2552
"minimist": "^1.2.5",
2653
"requirejs": "2.3.6",
2754
"rollup": "2.18.1",
28-
"rollup-plugin-commonjs": "10.1.0",
29-
"rollup-plugin-node-resolve": "5.2.0",
55+
"terser": "4.3.9",
3056
"ts-protoc-gen": "0.12.0",
3157
"typescript": "^3.9.5"
3258
},
3359
"scripts": {
34-
"format": "git-clang-format"
60+
"format": "git-clang-format",
61+
"postinstall": "ngc -p postinstall.tsconfig.json"
3562
},
3663
"husky": {
3764
"hooks": {

postinstall.tsconfig.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"compilerOptions": {
3+
"lib": [
4+
"dom",
5+
"es2015"
6+
],
7+
"experimentalDecorators": true,
8+
"types": [],
9+
"module": "amd",
10+
"moduleResolution": "node"
11+
},
12+
"angularCompilerOptions": {
13+
"enableSummariesForJit": true
14+
},
15+
"include": [
16+
"node_modules/@angular/**/*",
17+
"node_modules/@ctrl/**/*",
18+
"node_modules/@ngrx/**/*",
19+
],
20+
"exclude": [
21+
"node_modules/@ngrx/store/migrations/**",
22+
"node_modules/@ngrx/store/schematics/**",
23+
"node_modules/@ngrx/store/schematics-core/**",
24+
"node_modules/@ngrx/effects/schematics/**",
25+
"node_modules/@angular/cdk/schematics/**",
26+
"node_modules/@angular/cdk/typings/schematics/**",
27+
"node_modules/@angular/common/upgrade*",
28+
"node_modules/@angular/material/schematics/**",
29+
"node_modules/@angular/material/typings/schematics/**",
30+
"node_modules/@angular/router/upgrade*",
31+
"node_modules/@angular/bazel/**",
32+
"node_modules/@angular/compiler-cli/**",
33+
"node_modules/@angular/**/testing/**",
34+
]
35+
}

0 commit comments

Comments
 (0)