Skip to content

Commit

Permalink
Run e2e testnet tests via GHA, not Kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalinacienciala committed Jul 6, 2021
1 parent 563f453 commit ec6794e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/e2e-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: E2E tests / Testnet

on:
schedule:
- cron: '0 0 * * *' #TODO: specify different frequency
workflow_dispatch:
pull_request: # TODO: remove this trigger before merging to main

jobs:
e2e-testnet-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./e2e
steps:
- uses: actions/checkout@v2

- name: DEBUG # TODO: remove
run: |
echo ${{ secrets.KEEP_TEST_ELECTRUMX_HOSTNAME }}
echo ${{ secrets.KEEP_TEST_ELECTRUMX_PORT }}
echo ${{ secrets.KEEP_TEST_ETH_HOSTNAME }}
echo ${{ secrets.KEEP_TEST_ETH_HOSTNAME_NONEXISTING }}
- uses: actions/setup-node@v2
with:
node-version: "14.x"

- name: Install dependencies
run: npm install

- name: Cache Global NPM Cache
uses: actions/cache@v2
env:
cache-name: cache-global-npm-cache
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run e2e tests
run: |
./e2e-test.js \
--bitcoin-electrum-host=${{ secrets.KEEP_TEST_ELECTRUMX_HOSTNAME }} \
--bitcoin-electrum-port=${{ secrets.KEEP_TEST_ELECTRUMX_PORT }} \
--bitcoin-network="testnet" \
--ethereum-node=${{ secrets.KEEP_TEST_ETH_HOSTNAME }} \
--lot-size-satoshis="1000000"
2 changes: 1 addition & 1 deletion e2e/e2e-test.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node --experimental-modules
#!/usr/bin/env -S node --experimental-json-modules

import Web3 from "web3"
import ProviderEngine from "web3-provider-engine"
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"type": "module",
"dependencies": {
"@keep-network/tbtc.js": "file:../tbtc.js",
"@keep-network/tbtc.js": ">0.19.4-pre <0.19.4-rc",
"@0x/subproviders": "6.0.8",
"web3": "1.2.8",
"web3-provider-engine": "15.0.12",
Expand Down

0 comments on commit ec6794e

Please sign in to comment.