mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-19 13:18:25 +02:00
50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
name: Pull_Request
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
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']
|
|
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
|
|
- name: Build Relay
|
|
working-directory: ./relay
|
|
run: |
|
|
npm install && npm run build && docker build -t sphinxlightning/sphinx-relay-test .
|
|
- 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 ./relay;
|
|
- name: Turn on Stack
|
|
working-directory: ./stack
|
|
run: |
|
|
GITACTION_ENV=gitactionenv docker-compose up -d
|
|
- name: Check for NODES.json
|
|
working-directory: ./stack
|
|
run: |
|
|
sleep 120;
|
|
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
|