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: airbyte-local-cli-nodejs/DEVELOPER.md
+37-4Lines changed: 37 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# WIP: Airbyte CLI Rewrite
1
+
# Airbyte Local CLI
2
+
3
+
This is the manaual for developers
2
4
3
5
```sh
4
6
nvm use # Use Node v22
@@ -12,7 +14,7 @@ npm run pkg # Packaging with yao-pkg and generate an executable in out/pkg
12
14
13
15
### Node Js Testing
14
16
15
-
Please make sure you have a valid DEV Faros api key set in `FARO_API_KEY` environment variable and you have your docker on, otherwise some integration tests would fail.
17
+
Please make sure you have a valid DEV Faros api key set in `FAROS_API_KEY` environment variable and you have your docker running, otherwise some integration tests would fail. All tests are running against DEV so you need to create the api key in dev instead of prod.
16
18
17
19
```sh
18
20
# Run typescript unit and integration tests
@@ -26,8 +28,13 @@ npm test
26
28
27
29
### CLI Executable Testing
28
30
29
-
For shell testing, we use shellspec. Please install shellspec in your terminal to test it locally.
30
-
Same as above, you will need to set in `FARO_API_KEY` environment variable and have your docker on.
31
+
It should be easy to run Bash testing locally, while we rely Github action to do Powershell testing.
32
+
If you want to add new e2e testing, please make sure you add to both Bash and Powershell if possible.
33
+
34
+
#### Bash Testing
35
+
36
+
For Bash shell testing, we use shellspec. Please install shellspec in your terminal to test it locally.
37
+
Same as above, you will need to set DEV `FAROS_API_KEY` environment variable and have your docker running.
Tests are tagged with 3 different tags `argvParsing`, `main`, `docker`.
51
+
This is mostly for testing in different System/Arch in Github CI. We do different level of testing on different System/Arch depending on how the Github runner's capability, e.g. Github Mac runner doesn't have docker installed.
52
+
53
+
-`argvParsing`: testing arguments parsing.
54
+
-`main`: testing the main logic in the CLI that is after checking Docker is installed.
55
+
-`docker`: testing anything that will spin up a docker container.
56
+
43
57
Note: If you want to add new file to test, please remember to add `_spec.sh` postfix to your filename. Otherwise, shellspec won't pick your tests up.
58
+
59
+
#### Powershell Testing on Windows
60
+
61
+
We use Pester to run Powershell testing.
62
+
It's now enabled on github action and the test are defined in `./tests/pester/index.Tests.ps1`.
63
+
64
+
Since Github Windows runner ([Windows Server 2022](https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md)) only support running Windows images, we pushed 3 testing Windows images for Airbyte connnector.
65
+
They are all tagged with `windows-v0.14.11-rc0` as they are based on `v0.14.11`.
Please note that we do not support running Windows images on Windows in the CLI. We only support Linux images on Windows system. These Windows images are for testing purpose only.
72
+
If you want to push or update the images, you can refer to branch [`jg/windows-test-images`](https://github.com/faros-ai/airbyte-connectors/tree/jg/windows-test-images) in repo `faros-ai/airbyte-connectors`. There are Dockerfiles and steps in Github CI to build and push the test images.
73
+
74
+
## Packaging
75
+
76
+
We package the NodeJs project to executables by using [yao-pkg](https://github.com/yao-pkg/pkg). We picked it as the popular `pkg` tool from Vercel is archived and `yao-pkg` seems to be the next most maintainable option.
0 commit comments