Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add yaml for github actions test #57

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Integration Tests

on:
push:
branches:
- dev
- dev2
pull_request:
branches:
- dev
- dev2

jobs:
test:
runs-on: ubuntu-latest

services:
docker:
image: docker:19.03.12
options: --privileged
ports:
- 5432:5432
- 18443:18443
- 50001:50001
- 8080:8080
- 18080:18080
volumes:
- /var/run/docker.sock:/var/run/docker.sock

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Compose
run: |
docker-compose -f docker-compose-test.yml up --build -d

- name: Wait for services to be ready
run: |
sleep 5 # Adjust time as necessary for services to initialize

- name: Add Mnemonic
run: |
docker exec $(docker ps -qf "name=enclave") \
curl -X POST http://0.0.0.0:18080/add_mnemonic \
-H "Content-Type: application/json" \
-d '{
"mnemonic": "achieve merry hidden lyrics element brand student armed dismiss vague fury avocado grief crazy garlic gallery blur spider bag bless motor crawl surround copper",
"password": "b1gHKyfXTzs6",
"index": 0,
"threshold": 2
}'

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.12.2'

- name: Install Node.js dependencies for client
run: |
cd clients/nodejs
npm install

- name: Install Node.js dependencies for lib
run: |
cd clients/libs/nodejs
npm install

- name: Run npm link
run: |
cd clients/libs/nodejs
npm link

- name: Link mercurynodejslib
run: |
cd clients/nodejs
npm link mercurynodejslib

- name: Run Client-Side Tests
run: |
cd clients/apps/nodejs
node test_basic_workflow2.js

- name: Tear Down
run: |
docker-compose down
133 changes: 0 additions & 133 deletions clients/libs/nodejs/.gitignore

This file was deleted.

68 changes: 0 additions & 68 deletions clients/libs/nodejs/broadcast_backup_tx.js

This file was deleted.

13 changes: 0 additions & 13 deletions clients/libs/nodejs/coin_enum.js

This file was deleted.

Loading
Loading