test: make nice pytest reports on github (#2376)

* test: make nice pytest reports on github
utilizing this action: https://github.com/pavelzw/pytest-action/
This commit is contained in:
dni ⚡ 2024-04-05 08:35:51 +02:00 committed by GitHub
parent 820882db28
commit 209e2c5bff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 89 additions and 18 deletions

View file

@ -3,9 +3,6 @@ name: tests
on:
workflow_call:
inputs:
make:
default: test
type: string
python-version:
default: "3.9"
type: string
@ -48,15 +45,26 @@ jobs:
with:
python-version: ${{ inputs.python-version }}
- name: Run Tests
- name: Run pytest
uses: pavelzw/pytest-action@v2
env:
LNBITS_DATABASE_URL: ${{ inputs.db-url }}
LNBITS_BACKEND_WALLET_CLASS: FakeWallet
run: make ${{ inputs.make }}
FAKE_WALLET_SECRET: "ToTheMoon1"
LNBITS_DATA_FOLDER: "./tests/data"
PYTHONUNBUFFERED: 1
DEBUG: true
with:
verbose: false
job-summary: true
emoji: false
click-to-expand: false
custom-pytest: poetry run pytest
report-title: "test (${{ inputs.python-version }}, ${{ inputs.db-url }})"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
verbose: false