-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (56 loc) · 1.61 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
name: Unit Tests
on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
BITCOIN_DATA_PROVIDER: [mempool, electrs]
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "21"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run Unit Tests
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
BITCOIN_DATA_PROVIDER: ${{ matrix.BITCOIN_DATA_PROVIDER }}
BITCOIN_MEMPOOL_SPACE_API_URL: ${{ secrets.BITCOIN_MEMPOOL_SPACE_API_URL }}
BITCOIN_ELECTRS_API_URL: ${{ secrets.BITCOIN_ELECTRS_API_URL }}
BITCOIN_SPV_SERVICE_URL: ${{ secrets.BITCOIN_SPV_SERVICE_URL }}
PAYMASTER_PRIVATE_KEY: ${{ secrets.PAYMASTER_PRIVATE_KEY }}
PAYMASTER_RECEIVE_BTC_ADDRESS: ${{ secrets.PAYMASTER_RECEIVE_BTC_ADDRESS }}
CKB_RPC_URL: ${{ secrets.CKB_RPC_URL }}
CKB_INDEXER_URL: ${{ secrets.CKB_INDEXER_URL }}
REDIS_URL: redis://localhost:6379
CI_REDIS_URL: redis://localhost:6379
run: pnpm test