Skip to content

Support: Fixd UUID and prefix outputs string #2268

Support: Fixd UUID and prefix outputs string

Support: Fixd UUID and prefix outputs string #2268

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:
- ".github/**"
- 'docs/**'
- 'examples/**'
- '*.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 .
python -m pip install -r deploy/installations/testenv_requirements.txt
- name: Install DevKit (docs, testing, etc)
run: |
make install_devkit
- 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"
- name: Ext Testing
run: |
make ext_testing
- name: Usecase Testing
run: |
make usecase_testing
# ---------------------------------
# Integration Testing
# ---------------------------------
integration-testing:
needs: [ 'unit_testing' ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker Image
run: |
make build_sandbox
- name: Start Testing Environment
run: |
# Update hostnames
echo 127.0.0.1 mongodb | sudo tee -a /etc/hosts
# Run the integrated testing environment
make testenv_init
# To make sure that pytest etc. are installed in the container
docker exec testenv-sandbox-1 sh -c 'make install_devkit'
- name: Data-backend Testing
run: |
# Run the test-suite within the sandbox image from the test environment
docker exec testenv-sandbox-1 sh -c 'make databackend_testing'
- name: Shutdown Testing Environment
run: |
# Run the integrated testing environment
make testenv_shutdown