You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/howToDevelop.md
+118-18
Original file line number
Diff line number
Diff line change
@@ -1,53 +1,153 @@
1
1
# Development
2
2
3
-
##Build
3
+
# Build
4
4
5
5
In order to start develop the SDK you need to install the dependencies and build the packages.
6
6
7
-
```
7
+
```bash
8
8
$ npm i
9
9
$ npm run build
10
10
```
11
11
12
12
If you want to build a single package you can use the `-w` flag or execute the build command from the package folder.
13
13
14
-
```
14
+
```bash
15
15
# From the root folder
16
16
$ npm run build -w @marlowe.io/language-core-v1
17
17
# Or you can enter the package and build
18
18
$ cd packages/language/core/v1
19
19
$ npm run build
20
20
```
21
21
22
+
# Clean
23
+
22
24
In order to clean the build artifacts you can use the `clean` command.
23
25
24
-
```
26
+
```bash
25
27
$ npm run clean
26
28
```
27
29
28
-
To run the unit test you can execute the `test` command.
30
+
# Tests
29
31
32
+
N.B : It is recommended to clean and build the packages before you run the tests to be sure you are playing with the most up to date version of the codebase.
33
+
34
+
```bash
35
+
$ npm run clean && npm
30
36
```
37
+
38
+
## Unit Tests
39
+
40
+
To run the unit tests for all the packages, from the root folder you can execute the `test` command :
41
+
42
+
```bash
43
+
$ npm run test
44
+
```
45
+
46
+
If you want to run tests for a single package you can use the `-w` flag or execute the build command from the package folder.
47
+
48
+
```bash
49
+
# From the root folder
50
+
$ npm run clean && npm run build && npm run test -w @marlowe.io/language-core-v1
51
+
# Or you can enter the package folder and test. You will have to clean and build properly the local package
52
+
# dependencies of this current package if you modify one of them
53
+
# e.g : `packages/language/core/v1` depends on `packages/adapter`. Be sure you have build correctly this package before runnning your test that way.
54
+
$ cd packages/language/core/v1
31
55
$ npm run test
32
56
```
33
57
34
-
## E2E tests
58
+
## Integration/E2E Tests
59
+
60
+
### Setting up the env Configuration File
61
+
62
+
1. Create a `./env/.env.test` at the root of the project
63
+
2. Copy/Paste the following, and provide the necessary parameter
## set to true or false if you want to log Debug Info
118
+
LOG_DEBUG_LEVEL=false
119
+
```
120
+
#### How to Generate a new Seed Phrase for a Bank Wallet ?
121
+
122
+
1. At the root of the project :
123
+
```bash
124
+
npm run -w @marlowe.io/testing-kit genSeedPhrase
125
+
```
126
+
2. Copy/paste the words within quotes in the env file.
35
127
36
-
In order to run the E2E tests you need to create a `./env/.env.test` file that points to a working version of the Marlowe runtime and a working Blockfrost instance and a faucet PK.
128
+
#### How to add tAda to the Bank Wallet via a faucet ?
37
129
38
-
If you haven't done it before, go to https://blockfrost.io/ and create a free-tier account. Then, create a project and copy the project ID. Blockfrost is a Lucid dependency, eventually when
39
-
we migrate to a different library this wont be necessary.
130
+
1. Retrieve your Bank Wallet payment address
131
+
2. Go to https://docs.cardano.org/cardano-testnet/tools/faucet ask for test Ada on this address.
132
+
3. Wait a moment till the transaction is confirmed and you should be able to run the tests.
40
133
41
-
To create an instance of a local Marlowe runtime, follow the instructions in the [Marlowe starter kit](https://github.com/input-output-hk/marlowe-starter-kit/blob/main/docs/preliminaries.md)
134
+
### Running the E2E Tests
42
135
43
-
TODO: explain how to get the Faucet PK
136
+
To run the e2e tests for all the packages, from the root folder you can execute the `test:e2e` command :
0 commit comments