-
Notifications
You must be signed in to change notification settings - Fork 170
/
.travis.yml
45 lines (38 loc) · 1.12 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
language: php
os: linux
dist: bionic
addons:
apt:
packages:
- mysql-server-5.7
- mysql-client-core-5.7
- mysql-client-5.7
php:
- 7.2
- 7.3
- 7.4
env:
# Here we list the profiles that we want to test, each one will be tested, per version of PHP, in parallel
- PROFILE=testing
install:
# Initialise the database instance for the test
- sudo mysql -uroot -e 'create database ca_test;'
- sudo mysql -uroot -e "grant all on ca_test.* to 'ca_test'@'localhost' identified by 'password';"
# Set environment variables
- export COLLECTIVEACCESS_HOME="$(pwd)"
- export PATH="$PATH:$COLLECTIVEACCESS_HOME/support/bin"
# Create setup.php
- ln -s .travis.setup.php setup.php
- composer self-update
- composer update
# Install the testing profile
- support/bin/caUtils install --hostname=localhost --setup="$(pwd)/tests/setup-tests.php" --skip-roles --profile-name=$PROFILE --admin-email=support@collectiveaccess.org > install.log
before_script:
# Go into the tests directory to run the tests
- cd tests/
branches:
only:
- develop
- master
- master-fix
- dev/refactor