mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	This script and our CI scripts tools/travis/{backend,frontend} have
stayed pretty well in sync in the 6 months since 360c27ded made that
relationship explicit and easy to check!
Just one small exception; so fix that.
		
	
		
			
				
	
	
		
			65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
set -e
 | 
						|
 | 
						|
cd "$(dirname "$0")"/..
 | 
						|
 | 
						|
# read the options
 | 
						|
TEMP=`getopt -o f --long force -- "$@"`
 | 
						|
eval set -- "$TEMP"
 | 
						|
 | 
						|
# extract options.
 | 
						|
while true ; do
 | 
						|
    case "$1" in
 | 
						|
        -f|--force)
 | 
						|
            FORCEARG="--force";
 | 
						|
            shift;;
 | 
						|
        --)
 | 
						|
            shift;
 | 
						|
            break;;
 | 
						|
    esac
 | 
						|
done
 | 
						|
 | 
						|
function run {
 | 
						|
    echo '----'
 | 
						|
    echo "Running $@"
 | 
						|
    if ! "$@"; then
 | 
						|
        printf "\n\e[31;1mFAILED\e[0m $@\n"
 | 
						|
        exit 1
 | 
						|
    else
 | 
						|
        echo
 | 
						|
    fi
 | 
						|
}
 | 
						|
 | 
						|
# prep
 | 
						|
run ./tools/check-provision $FORCEARG
 | 
						|
run ./tools/clean-repo
 | 
						|
 | 
						|
# travis/backend
 | 
						|
run ./tools/lint --backend $FORCEARG
 | 
						|
run ./tools/test-tools
 | 
						|
run ./tools/test-backend $FORCEARG
 | 
						|
run ./tools/run-mypy $FORCEARG
 | 
						|
run ./tools/test-migrations
 | 
						|
# Not running SVG optimizing since it's low-churn
 | 
						|
# run ./tools/optimize-svg
 | 
						|
# Not running documentation tests since it takes 20s and only tests documentation
 | 
						|
# run ./tools/test-documentation
 | 
						|
run ./tools/test-help-documentation $FORCEARG
 | 
						|
run ./tools/test-api
 | 
						|
# Not running requirements check locally, because slow and low-churn
 | 
						|
# run ./tools/test-locked-requirements
 | 
						|
# Not running run-dev tests locally; we never have
 | 
						|
# run ./tools/test-run-dev
 | 
						|
# Not running queue worker reload tests since it's low-churn code
 | 
						|
# run ./tools/test-queue-worker-reload
 | 
						|
 | 
						|
# travis/frontend
 | 
						|
run ./tools/lint --frontend $FORCEARG
 | 
						|
run ./tools/test-js-with-node
 | 
						|
run ./manage.py makemessages --locale en
 | 
						|
run env PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
 | 
						|
run env PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
 | 
						|
run ./tools/test-js-with-casper $FORCEARG
 | 
						|
 | 
						|
printf '\n\e[32mAll OK!\e[0m\n'
 |