From 9b9dfd866330bcb3384afcbd4b346f22896ed07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Fri, 30 Aug 2024 07:02:59 +0200 Subject: [PATCH] fixup! --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 10 ---------- poetry.lock | 16 +++++++++++++++- pyproject.toml | 1 + 4 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6e90041 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI +on: + push: + branches: + - main + pull_request: + +jobs: + lint: + uses: lnbits/lnbits/.github/workflows/lint.yml@dev + tests: + runs-on: ubuntu-latest + needs: [lint] + strategy: + matrix: + python-version: ['3.9', '3.10'] + steps: + - uses: actions/checkout@v4 + - uses: lnbits/lnbits/.github/actions/prepare@dev + with: + python-version: ${{ matrix.python-version }} + - name: Run pytest + uses: pavelzw/pytest-action@v2 + env: + LNBITS_BACKEND_WALLET_CLASS: FakeWallet + PYTHONUNBUFFERED: 1 + DEBUG: true + with: + verbose: true + job-summary: true + emoji: false + click-to-expand: true + custom-pytest: poetry run pytest + report-title: 'test (${{ matrix.python-version }})' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4e02f97..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: lint -on: - push: - branches: - - main - pull_request: - -jobs: - lint: - uses: lnbits/lnbits/.github/workflows/lint.yml@dev diff --git a/poetry.lock b/poetry.lock index ba9809d..216b033 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1759,6 +1759,20 @@ pytest = ">=7.0.0" docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"] +[[package]] +name = "pytest-md" +version = "0.2.0" +description = "Plugin for generating Markdown reports for pytest results" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pytest-md-0.2.0.tar.gz", hash = "sha256:3b248d5b360ea5198e05b4f49c7442234812809a63137ec6cdd3643a40cf0112"}, + {file = "pytest_md-0.2.0-py3-none-any.whl", hash = "sha256:4c4cd16fea6d1485e87ee254558712c804a96d2aa9674b780e7eb8fb6526e1d1"}, +] + +[package.dependencies] +pytest = ">=4.2.1" + [[package]] name = "python-crontab" version = "3.0.0" @@ -2514,4 +2528,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.10 | ^3.9" -content-hash = "396571acd25215c0388722df4dd9615608e5b1667d5c3ec694091590ef7e9af1" +content-hash = "5769e5e26b6ac27703137705b33e6ab579a5a7ef272c78f59e301a5dfe8d4f63" diff --git a/pyproject.toml b/pyproject.toml index 0e65217..76d23cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ mypy = "^1.5.1" pre-commit = "^3.2.2" ruff = "^0.3.2" types-cffi = "^1.16.0.20240331" +pytest-md = "^0.2.0" [build-system] requires = ["poetry-core>=1.0.0"]