-
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
0 parents
commit 026640b
Showing
23 changed files
with
5,623 additions
and
0 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,30 @@ | ||
name: "test" | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
testbuild: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v18 | ||
with: | ||
install_url: https://releases.nixos.org/nix/nix-2.12.0/install | ||
extra_nix_config: | | ||
experimental-features = flakes nix-command | ||
- uses: cachix/cachix-action@v10 | ||
with: | ||
name: holochain-ci | ||
|
||
- name: Install and test | ||
run: | | ||
nix develop --command bash -c "npm i && npm t" | ||
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,12 @@ | ||
|
||
/node_modules/ | ||
/dist/ | ||
/target/ | ||
/.cargo/ | ||
*.happ | ||
*.webhapp | ||
*.zip | ||
*.dna | ||
.hc* | ||
.hc | ||
.running |
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,12 @@ | ||
[workspace] | ||
members = [ | ||
"dnas/*/zomes/coordinator/*", | ||
"dnas/*/zomes/integrity/*", | ||
] | ||
resolver = "2" | ||
|
||
[profile.dev] | ||
opt-level = "z" | ||
|
||
[profile.release] | ||
opt-level = "z" |
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,59 @@ | ||
# H Wot | ||
|
||
## Environment Setup | ||
|
||
> PREREQUISITE: set up the [holochain development environment](https://developer.holochain.org/docs/install/). | ||
Enter the nix shell by running this in the root folder of the repository: | ||
|
||
```bash | ||
nix-shell | ||
npm install | ||
``` | ||
|
||
**Run all the other instructions in this README from inside this nix-shell, otherwise they won't work**. | ||
|
||
## Running 2 agents | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
This will create a network of 2 nodes connected to each other and their respective UIs. | ||
It will also bring up the Holochain Playground for advanced introspection of the conductors. | ||
|
||
## Running the backend tests | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
## Bootstrapping a network | ||
|
||
Create a custom network of nodes connected to each other and their respective UIs with: | ||
|
||
```bash | ||
AGENTS=3 npm run network | ||
``` | ||
|
||
Substitute the "3" for the number of nodes that you want to bootstrap in your network. | ||
This will also bring up the Holochain Playground for advanced introspection of the conductors. | ||
|
||
## Packaging | ||
|
||
To package the web happ: | ||
``` bash | ||
npm run package | ||
``` | ||
|
||
You'll have the `hWOT.webhapp` in `workdir`. This is what you should distribute so that the Holochain Launcher can install it. | ||
You will also have its subcomponent `hWOT.happ` in the same folder`. | ||
|
||
## Documentation | ||
|
||
This repository is using these tools: | ||
- [NPM Workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/): npm v7's built-in monorepo capabilities. | ||
- [hc](https://github.com/holochain/holochain/tree/develop/crates/hc): Holochain CLI to easily manage Holochain development instances. | ||
- [@holochain/tryorama](https://www.npmjs.com/package/@holochain/tryorama): test framework. | ||
- [@holochain/client](https://www.npmjs.com/package/@holochain/client): client library to connect to Holochain from the UI. | ||
- [@holochain-playground/cli](https://www.npmjs.com/package/@holochain-playground/cli): introspection tooling to understand what's going on in the Holochain nodes. |
Oops, something went wrong.