-
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.
* updated readme files * updated readme files * added short description * added definitions * updated tests * updated packages versions and README files * updated file-storage README.md * added core package * added core package * fixed imports * added more types for file-storage * added more types for file-storage * added tests * fixed CI * clean up * updated test config * fixed dependencies
- Loading branch information
1 parent
b9166bf
commit 919d4f5
Showing
43 changed files
with
11,129 additions
and
5,649 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,26 @@ | ||
name: 'CI' | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- synchronize | ||
- edited | ||
workflow_call: | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install packages | ||
run: npm install | ||
- name: Compile | ||
run: npm run compile | ||
- name: Run tests | ||
run: npm run test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
version: "3" | ||
|
||
services: | ||
ddc-cdn-node: | ||
container_name: "ddc-cdn-node" | ||
image: 'cerebellumnetwork/ddc-gateway-node:dev-latest' | ||
environment: | ||
- 'HTTP_PORT=8080' | ||
- 'HTTP_ADDRESS=http://localhost:8080' | ||
- 'LOG_LEVEL=debug' | ||
- 'LOG_JSON_FORMAT=false' | ||
- 'TEST_ENABLED=true' | ||
ports: | ||
- '8080:8080' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:8080/info || exit 1 | ||
interval: 3s | ||
timeout: 1s | ||
retries: 5 | ||
|
||
ddc-storage-node-0: | ||
container_name: "ddc-storage-node-0" | ||
image: 'cerebellumnetwork/ddc-storage-node:dev-latest' | ||
environment: | ||
- 'HTTP_PORT=8090' | ||
- 'HTTP_ADDRESS=http://localhost:8090' | ||
- 'LOG_LEVEL=info' | ||
- 'LOG_JSON_FORMAT=false' | ||
- 'TEST_ENABLED=true' | ||
ports: | ||
- '8090:8090' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:8090/info || exit 1 | ||
interval: 3s | ||
timeout: 1s | ||
retries: 5 | ||
|
||
ddc-storage-node-1: | ||
container_name: "ddc-storage-node-1" | ||
image: 'cerebellumnetwork/ddc-storage-node:dev-latest' | ||
environment: | ||
- 'HTTP_PORT=8091' | ||
- 'HTTP_ADDRESS=http://localhost:8091' | ||
- 'LOG_LEVEL=info' | ||
- 'LOG_JSON_FORMAT=false' | ||
- 'TEST_ENABLED=true' | ||
ports: | ||
- '8091:8091' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:8091/info || exit 1 | ||
interval: 3s | ||
timeout: 1s | ||
retries: 5 | ||
|
||
ddc-storage-node-2: | ||
container_name: "ddc-storage-node-2" | ||
image: 'cerebellumnetwork/ddc-storage-node:dev-latest' | ||
environment: | ||
- 'HTTP_PORT=8092' | ||
- 'HTTP_ADDRESS=http://localhost:8092' | ||
- 'LOG_LEVEL=info' | ||
- 'LOG_JSON_FORMAT=false' | ||
- 'TEST_ENABLED=true' | ||
ports: | ||
- '8092:8092' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:8092/info || exit 1 | ||
interval: 3s | ||
timeout: 1s | ||
retries: 5 |
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,14 @@ | ||
const {DockerComposeEnvironment, Wait} = require("testcontainers"); | ||
const {composeFilePath, composeFile} = require("./jest.variables"); | ||
|
||
module.exports = async function (globalConfig) { | ||
console.log(`Start ${composeFilePath}/${composeFile}`); | ||
globalThis.__DOCKER_COMPOSE__ = await new DockerComposeEnvironment(composeFilePath, composeFile) | ||
.withWaitStrategy("ddc-cdn-node", Wait.forHealthCheck()) | ||
.withWaitStrategy("ddc-storage-node-0", Wait.forHealthCheck()) | ||
.withWaitStrategy("ddc-storage-node-1", Wait.forHealthCheck()) | ||
.withWaitStrategy("ddc-storage-node-2", Wait.forHealthCheck()) | ||
.up(); | ||
|
||
console.log(`Docker-compose is UP`); | ||
}; |
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,7 @@ | ||
const {composeFilePath, composeFile} = require("./jest.variables"); | ||
|
||
module.exports = async function (globalConfig) { | ||
console.log(`Stop ${composeFilePath}/${composeFile}`); | ||
await globalThis.__DOCKER_COMPOSE__.down(); | ||
console.log(`Docker-compose is DOWN`); | ||
}; |
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,4 @@ | ||
const path = require("path"); | ||
|
||
module.exports.composeFilePath = path.resolve("docker-compose"); | ||
module.exports.composeFile = "docker-compose.yml"; |
Oops, something went wrong.