-
Notifications
You must be signed in to change notification settings - Fork 20
71 lines (57 loc) · 1.83 KB
/
tests_mergin_db_sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Tests for Mergin DB Sync
on:
push:
paths:
- "test/**"
- "**.py"
- "requirements.txt"
- "requirements-dev.txt"
- "pyproject.toml"
- ".github/workflows/tests_mergin_db_sync.yaml"
env:
TEST_GEODIFF_EXE: geodiff
TEST_DB_CONNINFO: host=localhost dbname=test_db user=postgres password=postgres port=5432
TEST_MERGIN_URL: https://test.dev.merginmaps.com
TEST_API_USERNAME: test_db_sync
TEST_API_PASSWORD: ${{ secrets.TEST_API_PASSWORD }}
TEST_API_WORKSPACE: test-db-sync
jobs:
Tests-for-Mergin-DB-Sync:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Install Geodiff
run: |
sudo apt-get install libsqlite3-dev libpq-dev
git clone https://github.com/MerginMaps/geodiff.git
cd geodiff
mkdir build && cd build
cmake -DWITH_POSTGRESQL=TRUE ../geodiff
sudo make install
sudo cp geodiff /usr/local/bin
- name: Check Geodiff version
run: geodiff version
- name: Checkout
uses: actions/checkout@v4
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt
- name: Run tests
run: |
pytest test --cov=. --cov-report=term-missing:skip-covered -vv
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."