File: .gitlab-ci.yml

package info (click to toggle)
icingaweb2-module-director 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 8,464 kB
  • sloc: php: 60,573; sql: 7,643; javascript: 585; sh: 365; xml: 37; makefile: 18
file content (125 lines) | stat: -rw-r--r-- 4,060 bytes parent folder | download | duplicates (2)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
stages:
- Coding Standards
- Unit-Tests with DB

PSR2 CS Test:
  stage: Coding Standards
  tags:
  - xenial
  script:
  - phpcs --report-width=auto --report-full --report-gitblame --report-summary -p --standard=PSR2 --extensions=php --encoding=utf-8 -w -s library/Director/ library/vendor/ipl/ application/ *.php test

CentOS 7/MySQL:
  stage: Unit-Tests with DB
  tags:
  - centos7
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director MySQL TestDB"
  before_script:
  - mysql -u root -e "CREATE DATABASE $DIRECTOR_TESTDB"
  after_script:
  - mysql -u root -e "DROP DATABASE $DIRECTOR_TESTDB"
  script:
  - phpunit --verbose
  
CentOS 7/PostgreSQL:
  stage: Unit-Tests with DB
  tags:
  - centos7
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director PostgreSQL TestDB"
    DIRECTOR_TESTDB_USER: "director_${CI_BUILD_ID}_${CI_RUNNER_ID}"
  before_script:
  - psql postgres -q -c "CREATE DATABASE $DIRECTOR_TESTDB WITH ENCODING 'UTF8';"
  - psql $DIRECTOR_TESTDB -q -c "CREATE USER $DIRECTOR_TESTDB_USER WITH PASSWORD 'testing'; GRANT ALL PRIVILEGES ON DATABASE $DIRECTOR_TESTDB TO $DIRECTOR_TESTDB_USER; CREATE EXTENSION pgcrypto;"
  after_script:
  - psql postgres -c "DROP DATABASE $DIRECTOR_TESTDB"
  - psql postgres -c "DROP USER $DIRECTOR_TESTDB_USER"
  script:
  - phpunit --verbose

#CentOS 6/MySQL:
#  stage: Unit-Tests with DB
#  tags:
#  - centos6
#  - director
#  variables:
#    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
#    DIRECTOR_TESTDB_RES: "Director MySQL TestDB"
#  before_script:
#  - mysql -u root -e "CREATE DATABASE $DIRECTOR_TESTDB"
#  after_script:
#  - mysql -u root -e "DROP DATABASE $DIRECTOR_TESTDB"
#  script:
#  - phpunit

Jessie/MySQL:
  stage: Unit-Tests with DB
  tags:
  - jessie
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director MySQL TestDB"
  before_script:
  - mysql -u root -e "CREATE DATABASE $DIRECTOR_TESTDB"
  after_script:
  - mysql -u root -e "DROP DATABASE $DIRECTOR_TESTDB"
  script:
  - phpunit --verbose
  
Jessie/PostgreSQL:
  stage: Unit-Tests with DB
  tags:
  - jessie
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director PostgreSQL TestDB"
    DIRECTOR_TESTDB_USER: "director_${CI_BUILD_ID}_${CI_RUNNER_ID}"
  before_script:
  - psql postgres -q -c "CREATE DATABASE $DIRECTOR_TESTDB WITH ENCODING 'UTF8';"
  - psql $DIRECTOR_TESTDB -q -c "CREATE USER $DIRECTOR_TESTDB_USER WITH PASSWORD 'testing'; GRANT ALL PRIVILEGES ON DATABASE $DIRECTOR_TESTDB TO $DIRECTOR_TESTDB_USER; CREATE EXTENSION pgcrypto;"
  after_script:
  - psql postgres -c "DROP DATABASE $DIRECTOR_TESTDB"
  - psql postgres -c "DROP USER $DIRECTOR_TESTDB_USER"
  script:
  - phpunit --verbose

Xenial/MySQL:
  stage: Unit-Tests with DB
  tags:
  - xenial
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director MySQL TestDB"
  before_script:
  - mysql -u root -e "CREATE DATABASE $DIRECTOR_TESTDB"
  after_script:
  - mysql -u root -e "DROP DATABASE $DIRECTOR_TESTDB"
  script:
  - phpunit --verbose
  
Xenial/PostgreSQL:
  stage: Unit-Tests with DB
  tags:
  - ubuntu
  - director
  variables:
    DIRECTOR_TESTDB: "director_test_${CI_BUILD_ID}_${CI_RUNNER_ID}"
    DIRECTOR_TESTDB_RES: "Director PostgreSQL TestDB"
    DIRECTOR_TESTDB_USER: "director_${CI_BUILD_ID}_${CI_RUNNER_ID}"
  before_script:
  - psql postgres -q -c "CREATE DATABASE $DIRECTOR_TESTDB WITH ENCODING 'UTF8';"
  - psql $DIRECTOR_TESTDB -q -c "CREATE USER $DIRECTOR_TESTDB_USER WITH PASSWORD 'testing'; GRANT ALL PRIVILEGES ON DATABASE $DIRECTOR_TESTDB TO $DIRECTOR_TESTDB_USER; CREATE EXTENSION pgcrypto;"
  after_script:
  - psql postgres -c "DROP DATABASE $DIRECTOR_TESTDB"
  - psql postgres -c "DROP USER $DIRECTOR_TESTDB_USER"
  script:
  - phpunit --verbose