Skip to content
Snippets Groups Projects
Select Git revision
  • 11d860c22e9faebe402f280b375dc080632dd14e
  • main default
  • 35-cgu
  • 34-peertube-support
  • 27-add-autoplay-to-iframe
  • 33-bug-on-youtube-embed-urls
  • RC-Rekall-v1.1-fix_lpo
  • tuleap-140-go-back-to-my-capsules-page-when-i-m-on-capsule-preview-page
  • RC-Rekall-v1.2-fix10
  • RC-Rekall-v1.2-fix9
  • RC-Rekall-v1.2-fix8
  • RC-Rekall-v1.2-fix7
  • RC-Rekall-v1.2-fix6
  • RC-Rekall-v1.2-fix5
  • RC-Rekall-v1.2-fix4
  • RC-Rekall-v1.2-fix3
  • RC-Rekall-v1.2-fix2
  • RC-Rekall-v1.2-fix1
  • RC-Rekall-v1.1-fix-3
  • RC-Rekall-v1.1-fix-2
  • RC-Rekall-v1.1-fix-1
  • RC-Rekall-v1.1-delivered
  • preprod20220209-1535
23 results

ci-job.sh

Blame
  • ci-job.sh 1.09 KiB
    #!/bin/bash
    REDBOLD='\033[0;31;1m'
    GREENBOLD='\033[0;32;1m'
    BOLD='\033[1m'
    NORMAL='\033[0m'
    run_step(){
        name=$1
        shift
        echo -e "${BOLD} Running step : $name ${NORMAL}"
        $@
        ret=$?
        if [ $ret -ne 0 ];
        then
            echo -e "${REDBOLD}$name failed${NORMAL}"
            exit $ret
        else
            echo -e "${GREENBOLD}$name sucess${NORMAL}"
        fi
    }
    
    cd $(dirname $(dirname $0))
    if [ ! -f ".env" ]; then
        cp .env.test .env
    fi
    run_step "Starting apache" apache2ctl -DFOREGROUND &
    run_step "PHP dependencies" composer install
    run_step "Javascript dependencies" npm install
    run_step "Assets compilation" npm run dev
    echo "Waiting for mysql to be up and running"
    until nc -z -v -w30 mysql 3306; do
        sleep 5
    done
    echo "Doctrine create DB"
    php bin/console doctrine:migrations:migrate --no-interaction --env=test
    echo  "Doctrine load fixtures"
    php bin/console doctrine:fixtures:load --no-interaction --env=test
    run_step "Unit and functional tests" composer tests
    run_step "Php Code Sniffer" composer phpcs
    run_step "Php Static analysis" composer phpstan
    #run_step "Javascript ESLint" npm run lint