* Adds tests for GET /wallet * Update `httpx` to `0.23.0` and `http-core` to `0.15.0` in `venv` installation path * Fix `secp256k1 = "==0.14.0"` and `cffi = "==1.15.0"`
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
name: tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
venv-sqlite:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.7, 3.8, 3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
env:
|
|
VIRTUAL_ENV: ./venv
|
|
PATH: ${{ env.VIRTUAL_ENV }}/bin:${{ env.PATH }}
|
|
run: |
|
|
python -m venv ${{ env.VIRTUAL_ENV }}
|
|
./venv/bin/python -m pip install --upgrade pip
|
|
./venv/bin/pip install -r requirements.txt
|
|
./venv/bin/pip install pytest pytest-asyncio pytest-cov requests mock
|
|
- name: Run tests
|
|
run: make test
|
|
venv-postgres:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
# maps tcp port 5432 on service container to the host
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.8]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
env:
|
|
VIRTUAL_ENV: ./venv
|
|
PATH: ${{ env.VIRTUAL_ENV }}/bin:${{ env.PATH }}
|
|
run: |
|
|
python -m venv ${{ env.VIRTUAL_ENV }}
|
|
./venv/bin/python -m pip install --upgrade pip
|
|
./venv/bin/pip install -r requirements.txt
|
|
./venv/bin/pip install pytest pytest-asyncio pytest-cov requests mock
|
|
- name: Run tests
|
|
env:
|
|
LNBITS_DATABASE_URL: postgres://postgres:postgres@0.0.0.0:5432/postgres
|
|
run: make test
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|
|
pipenv-sqlite:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.7, 3.8, 3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install pipenv
|
|
pipenv install --dev
|
|
pipenv install importlib-metadata
|
|
- name: Run tests
|
|
run: make test-pipenv |