[TASK] Replace deprecated API calls and label references
[TYPO3CMS/Extensions/languagevisibility.git] / .travis.yml
1 # .travis.yml
2
3 # Customize email notification settings
4 notifications:
5   email:
6     recipients:
7       - stefan.rotsch@aoemedia.de
8     on_success: always
9     on_failure: always
10
11 # Build matrix configuration
12 language: php
13 php:
14   - 5.3
15   - 5.4
16
17 env:
18 #  - DB=mysql TYPO3=master INTEGRATION=master
19   - DB=mysql TYPO3=TYPO3_6-1 INTEGRATION=master
20   - DB=mysql TYPO3=TYPO3_6-0 INTEGRATION=master
21
22 before_script:
23 # Set extension specific variables
24   - export EXT_KEY=languagevisibility
25   - export DEPENDENCIES=( version workspaces )
26
27 # Disable SSL certificate validation (required for git.typo3.org)
28   - export GIT_SSL_NO_VERIFY=true
29
30 # Check prerequisites
31   - if [[ ! "${DB}" == "mysql" ]]; then exit 1; fi
32
33 # Move repository content to temporary directory
34   - mkdir -p tmp/${EXT_KEY}
35   - find . -maxdepth 1 \! -name tmp \! -name . -exec mv {} tmp/${EXT_KEY}/ \;
36
37 # Set up basic TYPO3 environment
38   - git clone --branch ${INTEGRATION} --depth 1 https://github.com/FluidTYPO3/TYPO3-Travis-Integration.git typo3_travis_integration
39   - git clone --branch ${TYPO3} --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_src
40   - git clone --branch ${TYPO3} --depth 1 https://git.typo3.org/TYPO3v4/Distributions/Introduction.git introduction
41   - source typo3_travis_integration/install-helper.sh
42   - if [[ -d typo3_src/t3lib ]]; then ln -s typo3_src/t3lib .; fi
43   - ln -s typo3_src/typo3 .
44   - ln -s typo3_travis_integration/typo3conf .
45   - mkdir fileadmin
46   - mkdir uploads
47   - mkdir typo3temp
48
49 # Move repository content to TYPO3 extension directory
50   - if [[ ! -d typo3conf/ext ]]; then mkdir typo3conf/ext; fi
51   - mv tmp/${EXT_KEY} typo3conf/ext/${EXT_KEY}
52
53 # Set up basic database structure
54   - mysql -e "DROP DATABASE IF EXISTS typo3_test;" -uroot
55   - mysql -e "create database typo3_test;" -uroot
56   - if [[ -f introduction/typo3conf/ext/introduction/Resources/Private/Subpackages/Introduction/Database/introduction.sql ]]; then mysql -uroot typo3_test < introduction/typo3conf/ext/introduction/Resources/Private/Subpackages/Introduction/Database/introduction.sql; fi
57   - if [[ -f typo3_travis_integration/dbimport/cache_tables.sql ]]; then mysql -uroot typo3_test < typo3_travis_integration/dbimport/cache_tables.sql; fi
58   - if [[ -f typo3_travis_integration/dbimport/cli_users.sql ]]; then mysql -uroot typo3_test < typo3_travis_integration/dbimport/cli_users.sql; fi
59   - git clone --branch master --depth 1 https://github.com/etobi/ext-coreapi.git typo3conf/ext/coreapi
60   - php $PWD/typo3/cli_dispatch.phpsh extbase extension:install --extensionKey=coreapi
61   - php $PWD/typo3/cli_dispatch.phpsh coreapi database:databasecompare 1,2,3,4,5,6,7,8
62
63 # Install PHPUnit extension
64   - git clone --branch master --depth 1 https://git.typo3.org/TYPO3v4/Extensions/phpunit.git typo3conf/ext/phpunit
65   - php $PWD/typo3/cli_dispatch.phpsh extbase extension:install --extensionKey=phpunit
66
67 # Install additional dependencies
68   - for DEPENDENCY in ${DEPENDENCIES[@]}; do php $PWD/typo3/cli_dispatch.phpsh extbase extension:install --extensionKey=${DEPENDENCY}; done
69
70 # Install the extension to be tested
71   - php $PWD/typo3/cli_dispatch.phpsh extbase extension:install --extensionKey=${EXT_KEY}
72
73 # Copy PHPUnit configuration to working directory (symlinking doesn't seem to work)
74   - if [[ -f phpunit.xml ]]; then rm -f phpunit.xml; fi
75   - if [[ -f typo3conf/ext/${EXT_KEY}/tests/phpunit.xml ]]; then cp typo3conf/ext/${EXT_KEY}/tests/phpunit.xml .; fi
76
77 script:
78   - php $PWD/typo3/cli_dispatch.phpsh phpunit -c phpunit.xml