forked from partiql/partiql-rust-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
382 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: PR To GitHub Page Repo | ||
|
||
on: | ||
push: | ||
branches: | ||
- react-website | ||
|
||
jobs: | ||
send-pull-requests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build Bundle | ||
run: | | ||
npm i | ||
npm run build | ||
- name: copy Bundle | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/artifact | ||
cp dist/*.wasm $GITHUB_WORKSPACE/artifact | ||
cp dist/*.js $GITHUB_WORKSPACE/artifact | ||
cp dist/*.txt $GITHUB_WORKSPACE/artifact | ||
ls $GITHUB_WORKSPACE/artifact >> $GITHUB_STEP_SUMMARY | ||
- name: Send pull-request | ||
run: | | ||
REPOSITORY="partiql/partiql.github.io" | ||
FOLDER="bin/$REPOSITORY" | ||
BRANCH_NAME="Update-Playground" | ||
gh repo clone partiql/partiql.github.io $FOLDER | ||
echo "clone completed" | ||
cd $FOLDER | ||
# Setup the committers identity. | ||
git config user.email "[email protected]" | ||
git config user.name "PartiQL Team" | ||
# Create a new feature branch for the changes. | ||
git checkout -b $BRANCH_NAME | ||
# Remove Static Folder | ||
rm -rf $FOLDER/ui/src/static | ||
mkdir $FOLDER/ui/src/static | ||
cp $GITHUB_WORKSPACE/artifact/*.wasm $FOLDER/ui/src/static | ||
cp $GITHUB_WORKSPACE/artifact/*.js $FOLDER/ui/src/static | ||
cp $GITHUB_WORKSPACE/artifact/playground.js.LICENSE.txt $FOLDER/ui/playground.js.LICENSE.txt | ||
# Commit the changes and push the feature branch to origin | ||
git add . | ||
git commit -m "update playground" | ||
git push origin $BRANCH_NAME | ||
gh pr create \ | ||
--body "Port From ${{ github.head_ref }}. Commit: ${{ github.sha }}" \ | ||
--title "Update Playground" \ | ||
--head "$BRANCH_NAME" \ | ||
--base "main" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,58 @@ | ||
# PartiQL Playground (Proof of Concept) | ||
|
||
PartiQL Playground provides the functionality to execute PartiQL in a web environment. | ||
|
||
_Please note, at this stage, the code as is in this package is considered experimental and should not be used for production._ | ||
|
||
:raised_hands: Checkout the [playground](https://partiql.org/playground.html#/evaluate) now :raised_hands:. | ||
|
||
## Development | ||
This Branch contains Rust Code for WASM generation. | ||
|
||
`PartiQL Playground` uses [WebAssembly (Wasm)](https://webassembly.org/) for integrating the front-end with PartiQL Rust back-end. | ||
|
||
Upon merging pull request, the GitHub action will automatically create a new pull request towards `react-website` branch. | ||
|
||
The `React Website` branch contains code for the experimental web application. | ||
|
||
To run test: | ||
``` | ||
``` | ||
|
||
## Build and run the website application (Locally) | ||
1. Checkout main branch and develop | ||
2. Build the package using `make` | ||
```commandline | ||
make build | ||
``` | ||
3. Port the wasm files to `react wesbite` branch | ||
```commandline | ||
git checkout -b temp | ||
make buid | ||
rm pkg-web/.gitignore | ||
git add . | ||
git commit -m "adding pkg-web to git" | ||
git checkout react-website | ||
git checkout temp -- pkg-web | ||
git add pkg-web | ||
git commit -m "wasm update" | ||
``` | ||
|
||
4. Build the `react website branch` | ||
```commandline | ||
npm i | ||
npm run serve | ||
``` | ||
|
||
|
||
## Legacy Asset | ||
| Branch Name | Asset | | ||
|-------------|-----------------------------------------------------------------------------------------------------| | ||
| Docker | A version of PartiQL Playground implementation. Additional features includes docker build Rest APIs | | ||
|
||
## Dependencies | ||
| Package | License | | ||
|------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| | ||
| [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) | [Apache License Version 2.0](https://github.com/rustwasm/wasm-bindgen/blob/main/LICENSE-APACHE) | | ||
| [wasm-pack](https://github.com/rustwasm/wasm-pack) | [Apache License Version 2.0](https://github.com/rustwasm/wasm-pack/blob/master/LICENSE-APACHE) | |
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
Binary file not shown.
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
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.