-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
.travis.yml
52 lines (48 loc) · 2.27 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
language: bash
os: linux
dist: focal
sudo: required
before_install:
- sudo apt update -qq -y
- sudo apt install -qq -y shellcheck
before_script:
- "sudo curl -s -o /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2"
- "sudo chmod a+x /usr/local/bin/shunit2"
env:
- SHUNIT_COLOR='always'
matrix:
include:
- os: linux
dist: bionic
script:
# Copy dotenv file.
- cp .env.dist .env
- sed -i "s/ENVIRONMENT=\"production\"/ENVIRONMENT=\"development\"/g" .env
- sed -i "s/SERVER_HOSTNAME=\"\"/SERVER_HOSTNAME=\"travis-ci.masedi.net\"/g" .env
- sed -i "s/SERVER_IP=\"\"/SERVER_IP=\"127.0.0.1\"/g" .env
- sed -i "s/AUTO_INSTALL=false/AUTO_INSTALL=true/g" .env
- sed -i "s/AUTO_REMOVE=false/AUTO_REMOVE=true/g" .env
- sed -i "s/FORCE_REMOVE=false/FORCE_REMOVE=true/g" .env
- sed -i "s/ADMIN_EMAIL=\"mail@example.com\"/ADMIN_EMAIL=\"me@masedi.net\"/g" .env
#- sed -i "s/NGINX_INSTALLER=\"repo\"/NGINX_INSTALLER=\"source\"/g" .env
- sed -i "s/PHP_VERSION=\"7.4\"/PHP_VERSION=\"7.4\"/g" .env
- sed -i "s/PHP_LOADER=\"none\"/PHP_LOADER=\"ioncube\"/g" .env
- sed -i "s/PHP_IMAGEMAGICK_INSTALLER=\"repo\"/PHP_IMAGEMAGICK_INSTALLER=\"source\"/g" .env
#- sed -i "s/INSTALL_MAILER=false/INSTALL_MAILER=true/g" .env
#- sed -i "s/INSTALL_SPFDKIM=false/INSTALL_SPFDKIM=true/g" .env
- sed -i "s/SENDER_DOMAIN=\"example.com\"/SENDER_DOMAIN=\"localhost.localhost\"/g" .env
- sed -i "s/INSTALL_FAIL2BAN=false/INSTALL_FAIL2BAN=true/g" .env
# Run the source through ShellCheck (http://www.shellcheck.net).
- shellcheck -s bash -x install.sh
- shellcheck -s bash -x remove.sh
- shellcheck -s bash -x lib/lemper-*.sh
- shellcheck -s bash -x scripts/cleanup_server.sh
- shellcheck -s bash -x scripts/helper.sh
- shellcheck -s bash -x scripts/install_*.sh
- shellcheck -s bash -x scripts/remove_*.sh
- shellcheck -s bash -x scripts/secure_server.sh
# Run initialization install.
- sudo bash scripts/cleanup_server.sh
- sudo bash scripts/install_dependencies.sh
# Run the install test cases through ShUnit2.
- sudo bash shunit2/run_test.sh