<commit_before>
# MY TUTORIALS
# http://blog.tgrrtt.com/exploring-the-travisci-configuration-file
# https://docs.travis-ci.com/user/customizing-the-build
# https://www.sysorchestra.com/2016/07/18/introduction-on-how-to-use-shellcheck-and-bashate-with-travis-ci/
# https://www.sysorchestra.com/2014/10/12/travisshunit2/

# sudo pip install --upgrade pip

# BASH UNIT TESTERS
# shellcheck
# bashate
# shunit2
# https://github.com/sstephenson/bats


dist: trusty
sudo: required

language: bash

before_install:
  - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse"
  - sudo apt-get -qq update
  - sudo apt-get -t trusty-backports install shellcheck
  - sudo -H pip install bashate

# install:
  # - echo "TODO INSTALL"

before_script:
  - curl -L "http://downloads.sourceforge.net/shunit2/shunit2-2.1.3.tgz" | tar zx
  - ln -s shunit2-2.1.3 shunit2
  - bashate_color(){ RED="$(tput setaf 1)"; YEL="$(tput setaf 3)"; NOR="$(tput sgr0)"; bashate -i E002,E003,E006 $@ | sed "s/\(\[E\].*:.*:\)/$RED\1$NOR/g" | sed "s/\(\[W\].*:.*:\)/$YEL\1$NOR/g"; }       

script:

  - shellcheck ./configure.sh
  - bashate_color ./configure.sh

  - shellcheck ./scripts/users-config.sh
  - bashate_color ./scripts/users-config.sh

  - shellcheck ./scripts/lightdm-config.sh
  - bashate_color ./scripts/lightdm-config.sh
  
  - shellcheck ./scripts/saltstack-config.sh
  - bashate_color ./scripts/saltstack-config.sh
  
  - shellcheck ./scripts/hosts-config.sh
  - bashate_color ./scripts/hosts-config.sh
  
  - shellcheck ./scripts/initial-software.sh
  - bashate_color ./scripts/initial-software.sh
  
  - shellcheck ./scripts/extra-software.sh
  - bashate_color ./scripts/extra-software.sh
  
  - shellcheck ./scripts/customization.sh
  - bashate_color ./scripts/customization.sh
  
  - shellcheck ./scripts/misc-hacks.sh
  - bashate_color ./scripts/misc-hacks.sh
  
  - shellcheck ./scripts/config-printers.sh
  - bashate_color ./scripts/config-printers.sh
  
  - shellcheck ./scripts/admin-config.sh
  - bashate_color ./scripts/admin-config.sh
  
  - shellcheck ./scripts/nsswitch-config.sh
  - bashate_color ./scripts/nsswitch-config.sh
  
  - shellcheck ./scripts/crontab-config.sh
  - bashate_color ./scripts/crontab-config.sh
  
  - shellcheck ./scripts/fstab-config.sh
  - bashate_color ./scripts/fstab-config.sh
  
  - shellcheck ./scripts/install-scripts.sh
  - bashate_color ./scripts/install-scripts.sh
  
  - shellcheck ./scripts/nslcd-config.sh
  - bashate_color ./scripts/nslcd-config.sh
  
  - shellcheck ./etc/update-motd.d/99-gaph-banner.sh
  - bashate_color ./etc/update-motd.d/99-gaph-banner.sh

  # - bash tests/myscript_shunit2_tests.sh


# after_success:
  # - echo "TODO after_success"

# after_failure:
  # - echo "TODO after_failure"

# after_script:
  # - echo "TODO after_script"

# here's a build step block
# after_script: 
  # - echo "We can put normal shell commands here"
  # - echo "more shell commands here"<commit_msg>Adding test to install script<commit_after>
# MY TUTORIALS
# http://blog.tgrrtt.com/exploring-the-travisci-configuration-file
# https://docs.travis-ci.com/user/customizing-the-build
# https://www.sysorchestra.com/2016/07/18/introduction-on-how-to-use-shellcheck-and-bashate-with-travis-ci/
# https://www.sysorchestra.com/2014/10/12/travisshunit2/

# sudo pip install --upgrade pip

# BASH UNIT TESTERS
# shellcheck
# bashate
# shunit2
# https://github.com/sstephenson/bats


dist: trusty
sudo: required

language: bash

before_install:
  - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse"
  - sudo apt-get -qq update
  - sudo apt-get -t trusty-backports install shellcheck
  - sudo -H pip install bashate

# install:
  # - echo "TODO INSTALL"

before_script:
  - curl -L "http://downloads.sourceforge.net/shunit2/shunit2-2.1.3.tgz" | tar zx
  - ln -s shunit2-2.1.3 shunit2
  - bashate_color(){ RED="$(tput setaf 1)"; YEL="$(tput setaf 3)"; NOR="$(tput sgr0)"; bashate -i E002,E003,E006 $@ | sed "s/\(\[E\].*:.*:\)/$RED\1$NOR/g" | sed "s/\(\[W\].*:.*:\)/$YEL\1$NOR/g"; }       

script:

  - shellcheck ./configure.sh
  - bashate_color ./configure.sh

  - shellcheck ./scripts/users-config.sh
  - bashate_color ./scripts/users-config.sh

  - shellcheck ./scripts/lightdm-config.sh
  - bashate_color ./scripts/lightdm-config.sh
  
  - shellcheck ./scripts/saltstack-config.sh
  - bashate_color ./scripts/saltstack-config.sh
  
  - shellcheck ./scripts/hosts-config.sh
  - bashate_color ./scripts/hosts-config.sh
  
  - shellcheck ./scripts/initial-software.sh
  - bashate_color ./scripts/initial-software.sh
  
  - shellcheck ./scripts/extra-software.sh
  - bashate_color ./scripts/extra-software.sh
  
  - shellcheck ./scripts/customization.sh
  - bashate_color ./scripts/customization.sh
  
  - shellcheck ./scripts/misc-hacks.sh
  - bashate_color ./scripts/misc-hacks.sh
  
  - shellcheck ./scripts/config-printers.sh
  - bashate_color ./scripts/config-printers.sh
  
  - shellcheck ./scripts/admin-config.sh
  - bashate_color ./scripts/admin-config.sh
  
  - shellcheck ./scripts/nsswitch-config.sh
  - bashate_color ./scripts/nsswitch-config.sh
  
  - shellcheck ./scripts/crontab-config.sh
  - bashate_color ./scripts/crontab-config.sh
  
  - shellcheck ./scripts/fstab-config.sh
  - bashate_color ./scripts/fstab-config.sh
  
  - shellcheck ./scripts/install-scripts.sh
  - bashate_color ./scripts/install-scripts.sh
  
  - shellcheck ./scripts/nslcd-config.sh
  - bashate_color ./scripts/nslcd-config.sh
  
  - shellcheck ./etc/update-motd.d/99-gaph-banner.sh
  - bashate_color ./etc/update-motd.d/99-gaph-banner.sh

  # - bash tests/myscript_shunit2_tests.sh

  - curl https://raw.githubusercontent.com/leoheck/gaph-host-config/master/configure.sh | sudo bash -s -- -c1 -a

# after_success:
  # - echo "TODO after_success"

# after_failure:
  # - echo "TODO after_failure"

# after_script:
  # - echo "TODO after_script"

# here's a build step block
# after_script: 
  # - echo "We can put normal shell commands here"
  # - echo "more shell commands here"
{'fraction_non_alphanumeric': 0.14798498939468102, 'fraction_numerical': 0.015500081579376733, 'mean_word_length': 3.011780104712042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6757960', 'n_tokens_mistral': 2421, 'n_tokens_neox': 2246, 'n_words': 374}