Skip to content

Commit

Permalink
Add testing ci.
Browse files Browse the repository at this point in the history
Remove old Pipfiles and add dev-requirements.txt for PyMEOS
  • Loading branch information
Diviloper committed Dec 20, 2023
1 parent 4b5b59c commit aecee63
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 35 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/test-develop.yml
Original file line number Diff line number Diff line change
@@ -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
48 changes: 48 additions & 0 deletions .github/workflows/test-master.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 0 additions & 21 deletions pymeos/Pipfile

This file was deleted.

4 changes: 4 additions & 0 deletions pymeos/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-dateutil
shapely
geopandas
pytest
14 changes: 0 additions & 14 deletions pymeos_cffi/Pipfile

This file was deleted.

0 comments on commit aecee63

Please sign in to comment.