-
Notifications
You must be signed in to change notification settings - Fork 22
108 lines (94 loc) · 3.01 KB
/
check.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: LNbits Extension CI
on:
push:
branches:
- main
pull_request:
jobs:
validate-json:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
check-json:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install Pillow requests
- name: Run check.py
run: python check.py
jmeter:
needs: [validate-json, check-json]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Set up Poetry 1.5.1
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.5.1"
- name: create logs and reports dir
run: |
mkdir logs
mkdir reports
- name: setup java version
run: |
update-java-alternatives --list
sudo update-java-alternatives --set /usr/lib/jvm/temurin-8-jdk-amd64
java -version
- name: install jmeter
env:
JAVA_HOME: /usr/lib/jvm/temurin-8-jdk-amd64
run: |
make install-jmeter
- name: start mirror server
env:
JAVA_HOME: /usr/lib/jvm/temurin-8-jdk-amd64
run: |
make start-mirror-server
- name: Setup LNbits and run
env:
LNBITS_ADMIN_UI: true
DEBUG: true
LNBITS_EXTENSIONS_DEFAULT_INSTALL: "watchonly, satspay, tipjar, tpos, lnurlp, withdraw"
LNBITS_EXTENSIONS_MANIFESTS: "https://raw.githubusercontent.com/lnbits/lnbits-extensions/${{ github.head_ref || github.ref_name }}/extensions.json"
LNBITS_BACKEND_WALLET_CLASS: FakeWallet
run: |
git clone https://github.com/lnbits/lnbits.git
cd lnbits
git checkout dev
poetry env use python3.10
poetry install
poetry run lnbits &
sleep 10
- name: run jmx scripts
env:
EXTENSIONS_MANIFEST_PATH: "/lnbits/lnbits-extensions/${{ github.head_ref || github.ref_name }}/extensions.json"
JAVA_HOME: /usr/lib/jvm/temurin-8-jdk-amd64
run: |
make test
- name: log results
if: ${{ always() }}
run: |
# catch up time for lnbits
sleep 1
cat lnbits/data/logs/debug.log
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: jmeter-test-results
path: |
reports/
logs/
lnbits/data/logs/