diff --git a/.github/workflows/test-develop.yml b/.github/workflows/test-develop.yml new file mode 100644 index 00000000..f5a1f946 --- /dev/null +++ b/.github/workflows/test-develop.yml @@ -0,0 +1,48 @@ +name: Test Develop + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install MEOS + run: | + apt install build-essential cmake postgresql-server-dev-15 libproj-dev libjson-c-dev libgsl-dev libgeos-dev + git clone --branch develop https://github.com/MobilityDB/MobilityDB + mkdir MobilityDB/build + cd MobilityDB/build + cmake .. -DMEOS=on + make -j + make install + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r pymeos_cffi/dev-requirements.txt + pip install -r pymeos/dev-requirements.txt + - name: Install pymeos_cffi + run: | + cd pymeos_cffi + python ./pymeos_cffi/builder/build_header.py + python ./pymeos_cffi/builder/build_pymeos_functions.py + pip install . + cd .. + - name: Test PyMEOS with pytest + run: | + cd pymeos + pytest diff --git a/.github/workflows/test-master.yml b/.github/workflows/test-master.yml new file mode 100644 index 00000000..11bfcf1d --- /dev/null +++ b/.github/workflows/test-master.yml @@ -0,0 +1,48 @@ +name: Test Master + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install MEOS + run: | + apt install build-essential cmake postgresql-server-dev-15 libproj-dev libjson-c-dev libgsl-dev libgeos-dev + git clone https://github.com/MobilityDB/MobilityDB + mkdir MobilityDB/build + cd MobilityDB/build + cmake .. -DMEOS=on + make -j + make install + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r pymeos_cffi/dev-requirements.txt + pip install -r pymeos/dev-requirements.txt + - name: Install pymeos_cffi + run: | + cd pymeos_cffi + python ./pymeos_cffi/builder/build_header.py + python ./pymeos_cffi/builder/build_pymeos_functions.py + pip install . + cd .. + - name: Test PyMEOS with pytest + run: | + cd pymeos + pytest diff --git a/pymeos/Pipfile b/pymeos/Pipfile deleted file mode 100644 index 59b24bc8..00000000 --- a/pymeos/Pipfile +++ /dev/null @@ -1,21 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -pymeos_cffi = {path = "../pymeos_cffi"} -python-dateutil = "*" -parsec = "*" -postgis = "*" -shapely = "<2.0.0" - -[dev-packages] -psycopg2 = "*" -psycopg = "*" -asyncpg = "*" -geopandas = "*" -tqdm = "*" -sphinx = "*" -pytest = "*" -black = "*" \ No newline at end of file diff --git a/pymeos/dev-requirements.txt b/pymeos/dev-requirements.txt new file mode 100644 index 00000000..c1600ba6 --- /dev/null +++ b/pymeos/dev-requirements.txt @@ -0,0 +1,4 @@ +python-dateutil +shapely +geopandas +pytest \ No newline at end of file diff --git a/pymeos_cffi/Pipfile b/pymeos_cffi/Pipfile deleted file mode 100644 index 498baaf2..00000000 --- a/pymeos_cffi/Pipfile +++ /dev/null @@ -1,14 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -cffi = "*" -python-dateutil = "*" -postgis = "*" -shapely = "*" - -[dev-packages] -build = "*" -black = "*" \ No newline at end of file