-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
92 lines (88 loc) · 4.71 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
services:
- docker
env:
- TEST_GROUP=2-3-7 INTEGRATION=false
- TEST_GROUP=2-3-7-p1 INTEGRATION=false
- TEST_GROUP=2-3-7-p2 INTEGRATION=false
- TEST_GROUP=2-3-7-p3 INTEGRATION=false
- TEST_GROUP=2-3-7-p4 INTEGRATION=false
- TEST_GROUP=2-4-0 INTEGRATION=false
- TEST_GROUP=2-4-1 INTEGRATION=false
- TEST_GROUP=2-4-2 INTEGRATION=false
- TEST_GROUP=2-4-3 INTEGRATION=false
- TEST_GROUP=2-4-4 INTEGRATION=false
- TEST_GROUP=2-4-4-p1 INTEGRATION=false
- TEST_GROUP=2-4-4-p2 INTEGRATION=false
- TEST_GROUP=2-4-4-p3 INTEGRATION=false
- TEST_GROUP=2-4-4-p4 INTEGRATION=false
- TEST_GROUP=2-4-4-p5 INTEGRATION=false
- TEST_GROUP=2-4-4-p6 INTEGRATION=false
- TEST_GROUP=2-4-5 INTEGRATION=false
- TEST_GROUP=2-4-5-p1 INTEGRATION=false
- TEST_GROUP=2-4-5-p2 INTEGRATION=false
- TEST_GROUP=2-4-5-p3 INTEGRATION=false
- TEST_GROUP=2-4-5-p4 INTEGRATION=false
- TEST_GROUP=2-4-5-p5 INTEGRATION=false
- TEST_GROUP=2-4-6 INTEGRATION=false
- TEST_GROUP=2-4-6-p1 INTEGRATION=false
- TEST_GROUP=2-4-6-p2 INTEGRATION=false
- TEST_GROUP=2-4-6-p3 INTEGRATION=false
- TEST_GROUP=2-4-7-beta1 INTEGRATION=false
- TEST_GROUP=2-4-7-beta2 INTEGRATION=false
- TEST_GROUP=2-latest INTEGRATION=false
- TEST_GROUP=2-3-7 INTEGRATION=true
- TEST_GROUP=2-3-7-p1 INTEGRATION=true
- TEST_GROUP=2-3-7-p2 INTEGRATION=true
- TEST_GROUP=2-3-7-p3 INTEGRATION=true
- TEST_GROUP=2-3-7-p4 INTEGRATION=true
- TEST_GROUP=2-4-0 INTEGRATION=true
- TEST_GROUP=2-4-1 INTEGRATION=true
- TEST_GROUP=2-4-2 INTEGRATION=true
- TEST_GROUP=2-4-3 INTEGRATION=true
- TEST_GROUP=2-4-4 INTEGRATION=true
- TEST_GROUP=2-4-4-p1 INTEGRATION=true
- TEST_GROUP=2-4-4-p2 INTEGRATION=true
- TEST_GROUP=2-4-4-p3 INTEGRATION=true
- TEST_GROUP=2-4-4-p4 INTEGRATION=true
- TEST_GROUP=2-4-4-p5 INTEGRATION=true
- TEST_GROUP=2-4-4-p6 INTEGRATION=true
- TEST_GROUP=2-4-5 INTEGRATION=true
- TEST_GROUP=2-4-5-p1 INTEGRATION=true
- TEST_GROUP=2-4-5-p2 INTEGRATION=true
- TEST_GROUP=2-4-5-p3 INTEGRATION=true
- TEST_GROUP=2-4-5-p4 INTEGRATION=true
- TEST_GROUP=2-4-5-p5 INTEGRATION=true
- TEST_GROUP=2-4-6 INTEGRATION=true
- TEST_GROUP=2-4-6-p1 INTEGRATION=true
- TEST_GROUP=2-4-6-p2 INTEGRATION=true
- TEST_GROUP=2-4-6-p3 INTEGRATION=true
- TEST_GROUP=2-4-7-beta1 INTEGRATION=true
- TEST_GROUP=2-4-7-beta2 INTEGRATION=true
- TEST_GROUP=2-latest INTEGRATION=true
- TEST_GROUP=2-latest INTEGRATION=both
before_install:
- travis_retry wget https://github.com/docker/compose/releases/download/v2.17.0/docker-compose-linux-x86_64
- sudo mv docker-compose-linux-x86_64 /usr/libexec/docker/cli-plugins/docker-compose
- sudo chmod +x /usr/libexec/docker/cli-plugins/docker-compose
- docker --version && docker compose version
script:
- shellcheck bin/*
- shellcheck Dockerfile-assets/*.sh
- if [[ $INTEGRATION = both ]]; then composer config --global --auth http-basic.repo.packagist.com token somefaketoken123; sudo chmod 644 ~/.config/composer/auth.json; fi
- if [[ $INTEGRATION = both ]]; then COMPOSER_AUTH_JSON_LOCATION=~/.config/composer/auth.json COMPOSER_AFTER_INSTALL_COMMAND='touch /tmp/travistest.txt;' CURRENT_EXTENSION="." FULL_INSTALL=1 ./bin/mtest-make $TEST_GROUP; fi
- if [[ $INTEGRATION = both ]]; then ./bin/mtest 'test -f /tmp/travistest.txt'; fi
- if [[ $INTEGRATION = both ]]; then ./bin/mtest 'grep -C10 somefaketoken123 /home/ampersand/.composer/auth.json'; fi
- if [[ $INTEGRATION = false ]]; then FULL_INSTALL=1 ./bin/mtest-make $TEST_GROUP; fi
- if [[ $INTEGRATION = false ]]; then curl --head http://0.0.0.0:1234 | grep 200; fi
- if [[ $INTEGRATION = false ]]; then ./bin/mtest 'php bin/magento'; fi
- if [[ $INTEGRATION = true ]]; then cd tests/Ampersand_HelloWorld; fi
- if [[ $INTEGRATION = true ]]; then composer install --no-interaction -vvv; fi
- if [[ $INTEGRATION = true ]]; then CURRENT_EXTENSION="." vendor/bin/mtest-make $TEST_GROUP ; fi
- if [[ $INTEGRATION = true ]]; then vendor/bin/mtest 'vendor/bin/phpunit -c /var/www/html/dev/tests/unit/phpunit.xml.dist --testsuite Unit --debug' ; fi
- if [[ $INTEGRATION = true ]]; then vendor/bin/mtest 'vendor/bin/phpunit -c /var/www/html/dev/tests/integration/phpunit.xml.dist --testsuite Integration --debug' ; fi
after_failure:
- docker exec mtest '/home/ampersand/assets/command.sh' 'cat /var/www/html/var/log/*.log'
- docker exec mtest '/home/ampersand/assets/command.sh' 'cat /var/log/apache2/error.log'
- docker exec mtest '//home/ampersand/assets/command.sh' 'cat /var/log/apache2/access.log'
- vendor/bin/mtest 'cat dev/tests/integration/tmp/sandbox*/var/log/*.log'
- sleep 10