CI: DB migration with real data (#776)
* fix migration conv.py * migrate with mock data
This commit is contained in:
parent
4b5e113c03
commit
4bb184e08b
4 changed files with 74 additions and 35 deletions
4
.github/workflows/migrations.yml
vendored
4
.github/workflows/migrations.yml
vendored
|
|
@ -38,12 +38,14 @@ jobs:
|
|||
./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
|
||||
sudo apt install unzip
|
||||
- name: Run migrations
|
||||
run: |
|
||||
rm -rf ./data
|
||||
mkdir -p ./data
|
||||
export LNBITS_DATA_FOLDER="./data"
|
||||
unzip tests/data/mock_data.zip -d ./data
|
||||
timeout 5s ./venv/bin/uvicorn lnbits.__main__:app --host 0.0.0.0 --port 5001 || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
|
||||
export LNBITS_DATABASE_URL="postgres://postgres:postgres@0.0.0.0:5432/postgres"
|
||||
timeout 5s ./venv/bin/uvicorn lnbits.__main__:app --host 0.0.0.0 --port 5001 || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
|
||||
./venv/bin/python tools/conv.py --dont-ignore-missing
|
||||
./venv/bin/python tools/conv.py
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue