Skip to content
31 changes: 31 additions & 0 deletions .github/workflows/autotests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Auto Tests
on: [push]
env:
TEST_MERGIN_URL: https://test.dev.cloudmergin.com/
TEST_API_USERNAME: test_plugin
TEST_API_PASSWORD: ${{ secrets.MERGINTEST_API_PASSWORD }}

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install python package dependencies
run: |
python -m pip install --upgrade pip
pip install python-dateutil pytz pytest pytest-cov pygeodiff coveralls

- name: Run tests
run: |
pytest --cov=mergin mergin/test/

- name: Submit coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls
4 changes: 4 additions & 0 deletions mergin/test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,11 @@ def test_sync_diff(mc, push_geodiff_enabled, pull_geodiff_enabled):
else:
assert os.path.exists(mp.fpath('base.gpkg_conflict_copy'))

# make sure that we leave geodiff enabled for further tests
toggle_geodiff(True)


@pytest.mark.skip(reason="currently fails on test.dev instance due to server bug")
def test_list_of_push_changes(mc):
PUSH_CHANGES_SUMMARY = "{'base.gpkg': {'geodiff_summary': [{'table': 'gpkg_contents', 'insert': 0, 'update': 1, 'delete': 0}, {'table': 'simple', 'insert': 1, 'update': 0, 'delete': 0}]}}"

Expand Down