Skip to content

Add basic rest fastapi server #2569

Add basic rest fastapi server

Add basic rest fastapi server #2569

Workflow file for this run

name: Code Testing
on:
pull_request:
branches:
- main
- '[0-9]+.[0-9]+'
paths: # Paths that may affect code quality
paths-ignore:
- "plugins/**"
- ".github/**"
- 'docs/**'
- '*.md'
- '*.rst'
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# ---------------------------------
# Unit Testing
# ---------------------------------
unit_testing:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: ["3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate Changelog Update
uses: tarides/changelog-check-action@v2
with:
changelog: CHANGELOG.md
#---------------------------------------------------
# Configuring Python environments.
#
# We cache both the pip packages and the installation dir.
# If the pyproject remains unchanged, we re-use the existing installation dir.
# If the pyproject has changed, we reinstall everything using the cached pip packages.
- name: Cache Pip Packages
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Cache Python Installation
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }} # Cache the whole python installation dir.
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_${{ hashFiles('pyproject.toml', '*/pyproject.toml') }}
#---------------------------------------------------
- name: Install SuperDuperDB Project
run: |
# Install core and testsuite dependencies on the cached python environment.
python -m pip install '.[test]'
# TODO: We currently need a default plugin to run tests using MongoDB.
# Once the local file database is complete, we may need to update this section.
python -m pip install plugins/mongodb
python -m pip install plugins/ibis
python -m pip install plugins/sqlalchemy
- name: Lint and type-check
run: |
make lint-and-type-check
- name: Unit Testing
run: |
make unit_testing pytest_arguments="--cov=superduper --cov-report=xml" SUPERDUPER_CONFIG=test/configs/default.yaml
make unit_testing pytest_arguments="--cov=superduper --cov-report=xml" SUPERDUPER_CONFIG=test/configs/sql.yaml
- name: Rest Server Testing
run: |
make rest_testing pytest_arguments="--cov=superduper --cov-report=xml" SUPERDUPER_CONFIG=test/configs/default.yaml
- name: Usecase Testing
run: |
make usecase_testing SUPERDUPER_CONFIG=test/configs/default.yaml
make usecase_testing SUPERDUPER_CONFIG=test/configs/sql.yaml