chore: ubuntu-latest #1608
Workflow file for this run
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
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 | |
export JAVA_HOME=/usr/lib/jvm/temurin-8-jdk-amd64 | |
java -version | |
- name: install jmeter | |
run: | | |
echo $JAVA_HOME | |
make install-jmeter | |
- name: start mirror server | |
env: | |
JAVA_HOME: /usr/lib/jvm/temurin-8-jdk-amd64 | |
run: | | |
echo $JAVA_HOME | |
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/ |