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:
parent
820882db28
commit
209e2c5bff
8 changed files with 89 additions and 18 deletions
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue