-
Notifications
You must be signed in to change notification settings - Fork 3
116 lines (98 loc) · 3.56 KB
/
tests.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Continuous Integration
on:
push:
branches:
- main
- 'feat/**'
pull_request:
branches:
- main
- 'feat/**'
env:
NO_DOCKER: true
COVERAGE: --coverage-text
LDAP_HOST: localhost
jobs:
postgresql:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['8.1', '8.2']
services:
postgres:
image: postgres:11-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: Tests over PostgreSQL 11
steps:
- uses: actions/checkout@v3
- name: Setup the CI
uses: ./.github/actions/setup
with:
php-version: ${{ matrix.php-versions }}
- name: Start OpenLDAP server
run: |
# The server cannot be run as a normal service because it
# wouldn't have access to the docker/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/ldap-ldifs:/ldifs \
-e LDAP_ROOT="dc=example,dc=com" \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=secret \
-e BITNAMI_DEBUG=true \
bitnami/openldap:2
- name: Run the test suite
run: make test
env:
DATABASE_URL: "postgresql://postgres:[email protected]:5432/bileto?serverVersion=11&charset=utf8"
mariadb:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['8.1', '8.2']
services:
mariadb:
image: mariadb:10.4
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mariadb
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
name: Tests over MariaDB 10.4
steps:
- uses: actions/checkout@v3
- name: Setup the CI
uses: ./.github/actions/setup
with:
php-version: ${{ matrix.php-versions }}
- name: Start OpenLDAP server
run: |
# The server cannot be run as a normal service because it
# wouldn't have access to the docker/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/ldap-ldifs:/ldifs \
-e LDAP_ROOT="dc=example,dc=com" \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=secret \
-e BITNAMI_DEBUG=true \
bitnami/openldap:2
- name: Run the test suite
run: make test
env:
DATABASE_URL: 'mysql://root:[email protected]:3306/bileto?serverVersion=10.4.29-MariaDB'