-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
75 lines (71 loc) · 2.29 KB
/
.gitlab-ci.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
stages:
- test
# Cache libraries in between jobs
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- vendor/
variables:
MMDB_FILEID: $MMDB_FILEID
# PHP 7.4
test:7.4:
stage: test
image: ecmchow/php-redis:7.4-cli
script:
- bash
- service redis-server restart
- wget -O mmdb/GeoLite2-City.mmdb "https://drive.google.com/uc?export=download&confirm=yes&id=$MMDB_FILEID"
- chmod -R +x tools
- composer install
- tools/php-cs-fixer-v3.phar fix Core --using-cache=no --diff --dry-run --verbose
- tools/php-cs-fixer-v3.phar fix start-analyzer.php --using-cache=no --diff --dry-run --verbose
- php tools/phpunit-9.5.phar --testsuite core-units
- openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout test/selfsigned.key -out test/selfsigned.crt
- composer run ci-e2e && sleep 0.1
- cat test/e2e.log
- cat test/e2e-redis.log
- composer run build
- chmod +x dist/ip-analyzer.phar
- composer run ci-build && sleep 0.1
- cat test/build.log
- cat test/build-redis.log
rules:
- changes:
- '**.env'
- '**.phar'
- '**.php'
- '**.sh'
- '**.json'
- '**.xml'
- '**.yml'
# PHP 8.1
test:8.1:
stage: test
image: ecmchow/php-redis:8.1-cli
script:
- bash
- service redis-server restart
- wget -O mmdb/GeoLite2-City.mmdb "https://drive.google.com/uc?export=download&confirm=yes&id=$MMDB_FILEID"
- chmod -R +x tools
- composer install
- tools/php-cs-fixer-v3.phar fix Core --using-cache=no --diff --dry-run --verbose
- tools/php-cs-fixer-v3.phar fix start-analyzer.php --using-cache=no --diff --dry-run --verbose
- php tools/phpunit-9.5.phar --testsuite core-units
- openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout test/selfsigned.key -out test/selfsigned.crt
- composer run ci-e2e && sleep 0.1
- cat test/e2e.log
- cat test/e2e-redis.log
- composer run build
- chmod +x dist/ip-analyzer.phar
- composer run ci-build && sleep 0.1
- cat test/build.log
- cat test/build-redis.log
rules:
- changes:
- '**.env'
- '**.phar'
- '**.php'
- '**.sh'
- '**.json'
- '**.xml'
- '**.yml'