fix #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
jobs: | |
test-video-processor: | |
name: Test Video Processor | |
runs-on: ubuntu-latest | |
services: | |
mobilitydb: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25440:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
submodules: recursive | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
init-shell: none | |
cache-downloads: false | |
- name: Check Python Versions | |
shell: micromamba-shell {0} | |
run: | | |
python --version | |
python3 --version | |
which python | |
which python3 | |
which pip | |
which pip3 | |
which poetry | |
- name: Install Dependencies | |
shell: micromamba-shell {0} | |
run: poetry install --no-interaction --without dev --with test | |
- name: Install lap (Hack) | |
shell: micromamba-shell {0} | |
run: | | |
pip install --upgrade pip | |
pip install lap | |
- name: Check Installed Packages | |
shell: micromamba-shell {0} | |
run: pip list | |
- name: Extend MobilityDB with User-Defined functions | |
shell: micromamba-shell {0} | |
run: | | |
pushd scripts/pg-extender | |
python ../generate_pg_extender.py | |
cat install.sql | |
psql -h localhost -p 25440 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
popd | |
env: | |
PGPASSWORD: docker | |
- name: Ingest data | |
shell: micromamba-shell {0} | |
run: | | |
python ./scripts/ingest_road.py | |
env: | |
AP_PORT: 25440 | |
- name: Unit Test | |
shell: micromamba-shell {0} | |
run: pytest --cov=spatialyze --cov-report=xml tests/video_processor | |
env: | |
AP_PORT: 25440 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: video-processor-coverage | |
path: ./coverage.xml | |
test-engine: | |
name: Test Engine | |
runs-on: ubuntu-latest | |
services: | |
mobilitydb: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25440:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mobilitydb-road-1: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25441:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mobilitydb-road-2: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25442:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mobilitydb-reset: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25443:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mobilitydb-import: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25444:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mobilitydb-sql: | |
image: mobilitydb/mobilitydb:14-3.2-1 | |
ports: | |
- 25445:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
init-shell: none | |
cache-downloads: false | |
- name: Check Python Versions | |
shell: micromamba-shell {0} | |
run: | | |
python --version | |
python3 --version | |
which python | |
which python3 | |
which pip | |
which pip3 | |
which poetry | |
- name: Install Dependencies | |
shell: micromamba-shell {0} | |
run: poetry install --no-interaction --without dev,cv --with test | |
- name: Check Installed Packages | |
shell: micromamba-shell {0} | |
run: pip list | |
- name: Extend MobilityDB with User-Defined functions | |
shell: micromamba-shell {0} | |
run: | | |
pushd scripts/pg-extender | |
python ../generate_pg_extender.py | |
cat install.sql | |
psql -h localhost -p 25440 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
psql -h localhost -p 25441 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
psql -h localhost -p 25442 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
psql -h localhost -p 25443 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
psql -h localhost -p 25444 -d mobilitydb -U docker -c "SET client_min_messages TO WARNING;" -c "\i install.sql;" | |
popd | |
env: | |
PGPASSWORD: docker | |
- name: Ingest data | |
shell: micromamba-shell {0} | |
run: | | |
python ./scripts/ingest_road.py | |
python ./scripts/import_tables.py | |
jupyter nbconvert --execute --to notebook ./scripts/optimized-scenic/add_attributes.ipynb | |
env: | |
AP_PORT: 25440 | |
- name: Generate Image data | |
shell: micromamba-shell {0} | |
run: python scripts/fake-images.py | |
- name: Unit Test | |
shell: micromamba-shell {0} | |
run: pytest --cov=spatialyze --cov-report=xml tests/engine | |
env: | |
AP_PORT: 25440 | |
AP_PORT_ROAD_1: 25441 | |
AP_PORT_ROAD_2: 25442 | |
AP_PORT_RESET: 25443 | |
AP_PORT_IMPORT: 25444 | |
AP_PORT_SQL: 25445 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: engine-coverage | |
path: ./coverage.xml | |
test-interface: | |
name: Test Interface | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
init-shell: none | |
cache-downloads: false | |
- name: Check Python Versions | |
shell: micromamba-shell {0} | |
run: | | |
python --version | |
python3 --version | |
which python | |
which python3 | |
which pip | |
which pip3 | |
which poetry | |
- name: Install Dependencies | |
shell: micromamba-shell {0} | |
run: poetry install --no-interaction --without dev,cv --with test | |
- name: Check Installed Packages | |
shell: micromamba-shell {0} | |
run: pip list | |
- name: Unit Test | |
shell: micromamba-shell {0} | |
run: pytest --cov=spatialyze --cov-report=xml tests/interface | |
env: | |
AP_PORT: 25440 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: interface-coverage | |
path: ./coverage.xml | |
upload-coverage: | |
name: Upload Coverage | |
needs: [test-video-processor, test-engine, test-interface] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT || github.token }} | |
- name: Download Coverage | |
uses: actions/download-artifact@v3 | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
verbose: true | |
fail_ci_if_error: true |