@@ -3,22 +3,12 @@ name: Tests for Mergin DB Sync
33on :
44 push :
55 paths :
6- - " test/**"
7- - " **.py"
8- - " requirements.txt"
9- - " requirements-dev.txt"
10- - " pyproject.toml"
11- - " .github/workflows/tests_mergin_db_sync.yaml"
12- workflow_dispatch :
13- inputs :
14- geodiff_branch :
15- description : " Geodiff branch to compile (default: master)"
16- required : false
17- default : " master"
18- mergin_client_branch :
19- description : " Mergin Python client branch from GitHub (leave empty to install from pip)"
20- required : false
21- default : " "
6+ - " test/**"
7+ - " **.py"
8+ - " requirements.txt"
9+ - " requirements-dev.txt"
10+ - " pyproject.toml"
11+ - " .github/workflows/tests_mergin_db_sync.yaml"
2212
2313env :
2414 TEST_GEODIFF_EXE : geodiff
2919 TEST_API_WORKSPACE : test-db-sync
3020
3121jobs :
22+
3223 Tests-for-Mergin-DB-Sync :
24+
3325 runs-on : ubuntu-latest
3426
3527 services :
@@ -44,40 +36,29 @@ jobs:
4436 options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
4537
4638 steps :
39+
4740 - name : Install Geodiff
4841 run : |
4942 sudo apt-get install libsqlite3-dev libpq-dev
50- git clone --branch ${{ inputs.geodiff_branch || 'master' }} https://github.com/MerginMaps/geodiff.git
43+ git clone https://github.com/MerginMaps/geodiff.git
5144 cd geodiff
5245 mkdir build && cd build
5346 cmake -DWITH_POSTGRESQL=TRUE ../geodiff
5447 sudo make install
55- sudo cp geodiff /usr/local/bin
48+ sudo cp geodiff /usr/local/bin
5649
57- - name : Check Geodiff version
50+ - name : Check Geodiff version
5851 run : geodiff version
59-
52+
6053 - name : Checkout
6154 uses : actions/checkout@v4
6255
63- - name : Install pygeodiff from source
64- if : ${{ inputs.mergin_client_branch != '' }}
65- run : |
66- python3 -m pip install scikit-build cmake ninja
67- cd geodiff
68- python3 -m pip install .
69-
7056 - name : Install Python dependencies
7157 run : |
7258 python3 -m pip install --upgrade pip
7359 python3 -m pip install -r requirements.txt
7460 python3 -m pip install -r requirements-dev.txt
7561
76- - name : Install Mergin client from GitHub
77- if : ${{ inputs.mergin_client_branch != '' }}
78- run : |
79- python3 -m pip install --no-deps git+https://github.com/MerginMaps/python-api-client.git@${{ inputs.mergin_client_branch }}
80-
8162 - name : Run tests
8263 run : |
8364 pytest test --cov=. --cov-report=term-missing:skip-covered -vv
0 commit comments