-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
496 additions
and
182 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 |
---|---|---|
@@ -1,59 +1,84 @@ | ||
name: Integration Test | ||
on: | ||
name: Integration Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
integration-test: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-name: ['boostPayment', 'botCreation', 'chatPayment', 'cleanup', 'clearAllChats', 'clearAllContacts', 'contacts', 'images', 'latestTest', 'lsats', 'paidMeet', 'paidTribeImages', 'queryRoutes', 'self', 'sphinxPeople', 'streamPayment', 'tribe', 'tribe3Escrow', 'tribe3Messages', 'tribe3Private', 'tribe3Profile', 'tribeEdit', 'tribeImages', 'messageLength', 'transportToken', 'pinnedMsg', 'hmac', 'socketIO', 'tribeMember'] | ||
test-name: | ||
[ | ||
'boostPayment', | ||
'botCreation', | ||
'chatPayment', | ||
'cleanup', | ||
'clearAllChats', | ||
'clearAllContacts', | ||
'contacts', | ||
'images', | ||
'latestTest', | ||
'lsats', | ||
'paidMeet', | ||
'paidTribeImages', | ||
'queryRoutes', | ||
'self', | ||
'sphinxPeople', | ||
'streamPayment', | ||
'tribe', | ||
'tribe3Escrow', | ||
'tribe3Messages', | ||
'tribe3Private', | ||
'tribe3Profile', | ||
'tribeEdit', | ||
'tribeImages', | ||
'messageLength', | ||
'transportToken', | ||
'pinnedMsg', | ||
'hmac', | ||
'socketIO', | ||
'tribeMember', | ||
'ampPayment', | ||
] | ||
steps: | ||
- name: Enable docker.host.internal for Ubuntu | ||
run: | | ||
pwd && sudo bash -c 'echo "172.17.0.1 host.docker.internal" >> /etc/hosts' | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
path: relay | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Build Relay | ||
working-directory: ./relay | ||
run: | | ||
npm install && npm run build && docker build -t sphinxlightning/sphinx-relay . | ||
- name: Checkout stack | ||
run: | | ||
git clone https://github.com/stakwork/sphinx-stack.git stack | ||
- name: give permissions | ||
working-directory: ./stack | ||
run: | | ||
chmod 777 ./bitcoind; | ||
chmod 777 -R ./relay; | ||
chmod 777 -R ./lnd; | ||
chmod 777 -R ./proxy; | ||
- name: Turn on Stack | ||
working-directory: ./stack | ||
run: | | ||
GITACTION_ENV=gitactionenv docker-compose -f alts/proxy.yml --project-dir . up -d | ||
- name: Check for NODES.json | ||
working-directory: ./stack | ||
run: | | ||
sleep 240; | ||
docker-compose ps | ||
docker logs meme.sphinx | ||
docker logs dave.sphinx | ||
docker wait stack_relaysetup_1; | ||
- name: copy file | ||
uses: canastro/copy-file-action@master | ||
with: | ||
source: "stack/relay/NODES.json" | ||
target: "relay/src/tests/configs/nodes.json" | ||
- name: Run tests | ||
working-directory: ./relay | ||
run: | | ||
npx ava src/tests/controllers/${{matrix.test-name}}.test.ts --verbose --serial --timeout=2m | ||
- name: Enable docker.host.internal for Ubuntu | ||
run: pwd && sudo bash -c 'echo "172.17.0.1 host.docker.internal" >> /etc/hosts' | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
path: relay | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Build Relay | ||
working-directory: ./relay | ||
run: npm install && npm run build && docker build -t sphinxlightning/sphinx-relay . | ||
- name: Checkout stack | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: antonilol/sphinx-stack | ||
ref: amp | ||
path: stack | ||
- name: Give permissions | ||
working-directory: ./stack | ||
run: chmod 777 -R bitcoind relay lnd proxy | ||
- name: Turn on Stack | ||
working-directory: ./stack | ||
run: GITACTION_ENV=gitactionenv docker-compose -f alts/proxy.yml --project-dir . up -d | ||
- name: Check for NODES.json | ||
working-directory: ./stack | ||
run: | | ||
docker-compose ps | ||
docker logs meme.sphinx | ||
docker logs dave.sphinx | ||
docker logs -f stack_lndsetup_1 | ||
docker logs -f stack_relaysetup_1 | ||
sleep 1m | ||
- name: Copy nodes.json | ||
run: cp stack/relay/NODES.json relay/src/tests/configs/nodes.json | ||
- name: Run tests | ||
working-directory: ./relay | ||
run: npx ava src/tests/controllers/${{matrix.test-name}}.test.ts --verbose --serial --timeout=2m |
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 |
---|---|---|
|
@@ -40,6 +40,3 @@ creds/* | |
!creds/.gitkeep | ||
!creds/scheduler_creds | ||
hsm_secret | ||
|
||
src/tests/configs/* | ||
src/tests/configs/nodes.json |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.