-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15761 from [BEAM-13008] Create gradle tasks for t…
…he Beam Playground * Implement Beam Playground gradle tasks * Fix trailing whitespace * Remove format from precommit * Fix order of includes and add descriptions * [BEAM-13008] add generated files and fix analysis issues (#2) * Reconcile errors with playgroundPrecommit output Co-authored-by: Aydar Farrakhov <stranniknm@gmail.com>
- Loading branch information
1 parent
9c8939b
commit dc0548e
Showing
29 changed files
with
1,422 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
# Playground | ||
|
||
The Beam Playground is a web application to run Beam code snippets in a modern | ||
browser. This directory holds code to build, test, and deploy the frontend | ||
and backend services. | ||
|
||
# Requirements | ||
|
||
The following requirements are needed for development, testing, and deploying. | ||
|
||
- [go 1.16+](https://golang.org) | ||
- [flutter](https://flutter.dev/) | ||
- Go protobuf dependencies (See [Go gRPC Quickstart](https://grpc.io/docs/languages/go/quickstart/)) | ||
- Dart protobuf dependencies (See [Dart gRPC Quickstart](https://grpc.io/docs/languages/dart/)) | ||
- [buf](https://docs.buf.build/installation) | ||
|
||
# Available Gradle Tasks | ||
|
||
## Perform overall pre-commit checks | ||
|
||
``` | ||
cd beam | ||
./gradlew playgroundPrecommit | ||
``` | ||
|
||
## To see available gradle tasks for playground: | ||
|
||
``` | ||
cd beam | ||
./gradlew playground:tasks | ||
``` | ||
|
||
## Re-generate protobuf | ||
|
||
``` | ||
cd beam | ||
./gradlew playground:generateProto | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* License); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an AS IS BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
description = "Apache Beam :: Playground :: Backend" | ||
|
||
task("format") { | ||
group = "build" | ||
description = "Format backend go code" | ||
doLast { | ||
exec { | ||
executable("gofmt") | ||
args("-w", ".") | ||
} | ||
} | ||
} | ||
|
||
task("tidy") { | ||
group = "build" | ||
description = "Run go mod tidy" | ||
doLast { | ||
exec { | ||
executable("go") | ||
args("mod", "tidy") | ||
} | ||
} | ||
} | ||
|
||
task("test") { | ||
group = "verification" | ||
description = "Test the backend" | ||
doLast { | ||
exec { | ||
executable("go") | ||
args("test", "internal/...") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.