mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 20:14:21 +01:00
* add websockets for quote updates * add test (not working) * wip: emit events to everyone * wip: emit events to everyone * wip, lots of things broken but invoice callback works * wip * add wip files * tests almost passing * add task * refactor nut constants * startup fix * works with old mints * wip cli * fix mypy * remove automatic invoice test now with websockets * remove comment * better logging * send back response * add rate limiter to websocket * add rate limiter to subscriptions * refactor websocket ratelimit * websocket tests * subscription kinds * doesnt start * remove circular import * update * fix mypy * move test file in test because it fails if it runs later... dunno why * adjust websocket NUT-06 settings * local import and small fix * disable websockets in CLI if "no_check" is selected * move subscription test to where it was * check proof state with callback, add tests * tests: run mint fixture per module instead of per session * subscription command name fix * test per session again * update test race conditions * fix tests * clean up * tmp * fix db issues and remove cached secrets * fix tests * blindly try pipeline * remove comments * comments
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
python-version:
|
|
default: "3.10.4"
|
|
type: string
|
|
poetry-version:
|
|
default: "1.7.1"
|
|
type: string
|
|
mint-database:
|
|
default: ""
|
|
type: string
|
|
os:
|
|
default: "ubuntu-latest"
|
|
type: string
|
|
mint-only-deprecated:
|
|
default: "false"
|
|
type: string
|
|
|
|
jobs:
|
|
poetry:
|
|
name: Run (db ${{ inputs.mint-database }}, deprecated api ${{ inputs.mint-only-deprecated }})
|
|
runs-on: ${{ inputs.os }}
|
|
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
env:
|
|
POSTGRES_USER: cashu
|
|
POSTGRES_PASSWORD: cashu
|
|
POSTGRES_DB: cashu
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
steps:
|
|
- name: Checkout repository and submodules
|
|
uses: actions/checkout@v2
|
|
- uses: ./.github/actions/prepare
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
poetry-version: ${{ inputs.poetry-version }}
|
|
- name: Run tests
|
|
env:
|
|
MINT_BACKEND_BOLT11_SAT: FakeWallet
|
|
WALLET_NAME: test_wallet
|
|
MINT_HOST: localhost
|
|
MINT_PORT: 3337
|
|
MINT_TEST_DATABASE: ${{ inputs.mint-database }}
|
|
DEBUG_MINT_ONLY_DEPRECATED: ${{ inputs.mint-only-deprecated }}
|
|
TOR: false
|
|
run: |
|
|
make test
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|