-
-
Save egidijus/dd5a10b5837214060722e1c2c4b71f30 to your computer and use it in GitHub Desktop.
run-tests.sh
This file contains hidden or 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
#!/bin/bash | |
# Runs airflow-dags tests. | |
# Set Nose defaults if no arguments are passed from CLI. | |
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
NOSE_ARGS=$@ | |
if [ -z "$NOSE_ARGS" ]; then | |
NOSE_ARGS=" \ | |
--with-coverage \ | |
--cover-erase \ | |
--cover-package=dags \ | |
--cover-package=weflow \ | |
--cover-html-dir=build/coverage \ | |
--cover-html \ | |
--with-xunit \ | |
--xunit-file=build/test_output.xml \ | |
-s \ | |
-v \ | |
--logging-level=DEBUG" | |
fi | |
# Export for the DAGs import test. | |
export AIRFLOW_DAGS=$CWD/dags | |
# Create a build directory to store test output. | |
mkdir -p build | |
# Run Flake to make sure things are stylish. | |
flake8 --max-line-length 120 --max-complexity 12 dags weflow | |
# Run tests. | |
nosetests $NOSE_ARGS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment