#!/bin/bash

set -e

# run linting
if [ "$SKIP_LINT" -ne 1 ]; then
    echo 'Running linting...'
    flake8 index.py config.py tests/integration
else
    echo 'Skipping linting...'
fi

# run unit tests
echo 'Running unit tests...'
python -m pytest tests/unit -v

# run integration tests
echo 'Running integration tests...'
python -m pytest tests/integration -v

echo 'Done!'
