mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 20:42:32 +02:00
reactivate actions (#682)
* reactivate other actions * black * codeql 2 * black only * remove mock event loop * do not follow grpc
This commit is contained in:
10
.github/workflows/codeql.yml
vendored
10
.github/workflows/codeql.yml
vendored
@@ -2,9 +2,9 @@ name: codeql
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master, ]
|
branches: [main, ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 12 * * 5'
|
- cron: '0 12 * * 5'
|
||||||
|
|
||||||
@@ -19,10 +19,10 @@ jobs:
|
|||||||
- run: git checkout HEAD^2
|
- run: git checkout HEAD^2
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: javascript, python
|
languages: javascript, python
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
10
.github/workflows/formatting.yml
vendored
10
.github/workflows/formatting.yml
vendored
@@ -2,9 +2,9 @@ name: formatting
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
black:
|
black:
|
||||||
@@ -15,9 +15,3 @@ jobs:
|
|||||||
- run: python3 -m venv venv
|
- run: python3 -m venv venv
|
||||||
- run: ./venv/bin/pip install black
|
- run: ./venv/bin/pip install black
|
||||||
- run: make checkblack
|
- run: make checkblack
|
||||||
prettier:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: npm install
|
|
||||||
- run: make checkprettier
|
|
||||||
|
@@ -43,7 +43,7 @@ async def create_withdraw_link(
|
|||||||
urlsafe_short_hash(),
|
urlsafe_short_hash(),
|
||||||
int(datetime.now().timestamp()) + data.wait_time,
|
int(datetime.now().timestamp()) + data.wait_time,
|
||||||
usescsv,
|
usescsv,
|
||||||
data.webhook_url
|
data.webhook_url,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
link = await get_withdraw_link(link_id, 0)
|
link = await get_withdraw_link(link_id, 0)
|
||||||
|
@@ -109,6 +109,7 @@ async def m003_make_hash_check(db):
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def m004_webhook_url(db):
|
async def m004_webhook_url(db):
|
||||||
"""
|
"""
|
||||||
Adds webhook_url
|
Adds webhook_url
|
||||||
|
6
mypy.ini
6
mypy.ini
@@ -1 +1,7 @@
|
|||||||
[mypy]
|
[mypy]
|
||||||
|
ignore_missing_imports = True
|
||||||
|
exclude = lnbits/wallets/lnd_grpc_files/
|
||||||
|
exclude = lnbits/extensions/
|
||||||
|
|
||||||
|
[mypy-lnbits.wallets.lnd_grpc_files.*]
|
||||||
|
follow_imports = skip
|
||||||
|
@@ -14,14 +14,6 @@ from lnbits.wallets.fake import FakeWallet
|
|||||||
|
|
||||||
from .helpers import get_random_string
|
from .helpers import get_random_string
|
||||||
|
|
||||||
# primitive event loop for generate_mock_invoice()
|
|
||||||
def drive(c):
|
|
||||||
while True:
|
|
||||||
try:
|
|
||||||
c.send(None)
|
|
||||||
except StopIteration as e:
|
|
||||||
return e.value
|
|
||||||
|
|
||||||
|
|
||||||
# generates an invoice with FakeWallet
|
# generates an invoice with FakeWallet
|
||||||
async def generate_mock_invoice(**x):
|
async def generate_mock_invoice(**x):
|
||||||
@@ -44,6 +36,14 @@ WALLET.create_invoice = generate_mock_invoice
|
|||||||
# times which makes the db throw an error due to uniqueness contraints
|
# times which makes the db throw an error due to uniqueness contraints
|
||||||
# on the checking ID
|
# on the checking ID
|
||||||
|
|
||||||
|
# # primitive event loop for generate_mock_invoice()
|
||||||
|
# def drive(c):
|
||||||
|
# while True:
|
||||||
|
# try:
|
||||||
|
# c.send(None)
|
||||||
|
# except StopIteration as e:
|
||||||
|
# return e.value
|
||||||
|
|
||||||
# # finally we await it
|
# # finally we await it
|
||||||
# invoice = drive(generate_mock_invoice())
|
# invoice = drive(generate_mock_invoice())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user