Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Mar 6, 2024
1 parent 76f1d6a commit aebb46d
Show file tree
Hide file tree
Showing 10 changed files with 592 additions and 30 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "test"
name: "main"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
Expand Down Expand Up @@ -29,5 +29,17 @@ jobs:

- name: Install and test
run: |
nix develop --command bash -c "npm i && npm t"
nix develop --command bash -c "npm i && npm t && npm run build -w ui"
push-to-nix-cache:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Build zomes
run: |
nix build .#profiles_integrity
sha256sum result
nix build .#profiles
sha256sum result
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist/
*.happ
storybook-static/
locales/
result*
2 changes: 1 addition & 1 deletion crates/coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hc_zome_profiles_integrity = { path = "../integrity", version = "0.2" }
hdk = { workspace = true }

[dev-dependencies]
fixt = "0.3.0-beta-dev.0"
fixt = "0.3.0-beta-dev.1"
futures = { version = "0.3.1", default-features = false }
hdk = { workspace = true, features = ["encoding", "test_utils"] }
holochain = { workspace = true, features = ["test_utils"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/coordinator/tests/create_and_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async fn create_and_get() {
// Use prebuilt DNA file
let dna_path = std::env::current_dir()
.unwrap()
.join("../../workdir/profiles-test.dna");
.join(std::env::var("DNA_PATH").expect("DNA_PATH not set"));
let dna = SweetDnaFile::from_bundle(&dna_path).await.unwrap();

// Set up conductors
Expand Down
2 changes: 1 addition & 1 deletion crates/coordinator/tests/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async fn create_and_get() {
// Use prebuilt DNA file
let dna_path = std::env::current_dir()
.unwrap()
.join("../../workdir/profiles-test.dna");
.join(std::env::var("DNA_PATH").expect("DNA_PATH not set"));
let dna = SweetDnaFile::from_bundle(&dna_path).await.unwrap();

// Set up conductors
Expand Down
31 changes: 30 additions & 1 deletion crates/coordinator/zome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,41 @@
, system
, lib
, options
, self'
, ...
}: {
packages.profiles = inputs.hcUtils.outputs.lib.rustZome {
workspacePath = rootPath;
holochain = inputs'.holochain;
cratePath = ./.;
crateCargoToml = ./Cargo.toml;
};

checks.profiles = inputs.hcUtils.outputs.lib.sweettest {
workspacePath = rootPath;
holochain = inputs'.holochain;
dna = inputs.hcUtils.outputs.lib.dna {
dnaManifest = builtins.toFile "dna.yaml" ''
---
manifest_version: "1"
name: test_dna
integrity:
network_seed: ~
properties: ~
origin_time: 1709638576394039
zomes:
- name: profiles_integrity
coordinator:
zomes:
- name: profiles
hash: ~
dependencies:
- name: profiles_integrity
dylib: ~
'';
zomes = inputs.hcUtils.outputs.lib.filterZomes self'.packages;
holochain = inputs'.holochain;
};
crateCargoToml = ./Cargo.toml;
};
};
}
Expand Down
2 changes: 1 addition & 1 deletion crates/integrity/zome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
packages.profiles_integrity = inputs.hcUtils.outputs.lib.rustZome {
workspacePath = rootPath;
holochain = inputs'.holochain;
cratePath = ./.;
crateCargoToml = ./Cargo.toml;
};
};
}
Expand Down
Loading

0 comments on commit aebb46d

Please sign in to comment.