11
11
- master
12
12
13
13
jobs :
14
- test :
14
+ builds :
15
15
name : ${{ matrix.compiler }} on ${{ matrix.os }}
16
16
strategy :
17
17
fail-fast : false
30
30
- dmd-2.088.1
31
31
- dmd-2.087.1
32
32
- dmd-2.086.1
33
- - dmd-2.085.1
34
- - dmd-2.084.1
35
- - dmd-2.083.1
36
- - dmd-2.082.1
37
33
- ldc-1.25.1 # eq to dmd v2.095.1
38
34
- ldc-1.24.0 # eq to dmd v2.094.1
39
35
- ldc-1.23.0 # eq to dmd v2.093.1
42
38
- ldc-1.18.0 # eq to dmd v2.088.1
43
39
- ldc-1.17.0 # eq to dmd v2.087
44
40
- ldc-1.16.0 # eq to dmd v2.086.1
45
- - ldc-1.15.0 # eq to dmd v2.085.1
46
- - ldc-1.14.0 # eq to dmd v2.084.1
47
- - ldc-1.13.0 # eq to dmd v2.083.1
48
- - ldc-1.12.0 # eq to dmd v2.082.1
49
41
runs-on : ${{ matrix.os }}
50
42
steps :
51
43
- uses : actions/checkout@v1
65
57
66
58
- name : build with SQLite config
67
59
run : dub build --config=SQLite
60
+
61
+ examples :
62
+ name : Test ${{ matrix.compiler }} on ${{ matrix.os }}
63
+ runs-on : ${{ matrix.os }}
64
+ strategy :
65
+ fail-fast : false
66
+ matrix :
67
+ os : [ ubuntu-latest, windows-latest, macos-latest ]
68
+ compiler :
69
+ - dmd-latest
70
+ - ldc-latest
71
+ steps :
72
+ - uses : actions/checkout@v2
73
+
74
+ - name : Install D ${{ matrix.compiler }}
75
+ uses : dlang-community/setup-dlang@v1
76
+ with :
77
+ compiler : ${{ matrix.compiler }}
78
+
79
+ - name : Install dependencies on Ubuntu
80
+ if : startsWith(matrix.os, 'ubuntu')
81
+ run : sudo apt-get update && sudo apt-get install libev-dev libpq-dev libevent-dev libsqlite3-dev -y
82
+
83
+ - name : Install dependencies on Mac OSX
84
+ if : startsWith(matrix.os, 'macos')
85
+ run : brew bundle
86
+
87
+ - name : Run example 1
88
+ working-directory : examples/example1
89
+ run : dub
90
+
91
+ integration-tests :
92
+ name : Integration Tests
93
+ runs-on : ubuntu-20.04
94
+
95
+ services :
96
+ mysql :
97
+ image : mysql:5.7
98
+ ports : [3306]
99
+ env :
100
+ MYSQL_ROOT_PASSWORD : f48dfhw3Hd!Asah7i2aZ
101
+ MYSQL_DATABASE : hdtest
102
+ MYSQL_USER : testuser
103
+ MYSQL_PASSWORD : passw0rd
104
+ # Set health checks to wait until mysql service has started
105
+ options : >-
106
+ --health-cmd "mysqladmin ping"
107
+ --health-interval 10s
108
+ --health-timeout 3s
109
+ --health-retries 4
110
+
111
+ postgres :
112
+ image : postgres
113
+ ports : [5432]
114
+ env :
115
+ POSTGRES_DB : hdtest
116
+ POSTGRES_USER : testuser
117
+ POSTGRES_PASSWORD : passw0rd
118
+ # Set health checks to wait until postgres service has started
119
+ options : >-
120
+ --health-cmd pg_isready
121
+ --health-interval 10s
122
+ --health-timeout 3s
123
+ --health-retries 3
124
+
125
+ steps :
126
+ - uses : actions/checkout@v2
127
+
128
+ - name : Install latest DMD
129
+ uses : dlang-community/setup-dlang@v1
130
+ with :
131
+ compiler : dmd-latest
132
+
133
+ - name : HD Test (SQLite)
134
+ working-directory : ./hdtest
135
+ run : |
136
+ dub build --config=SQLite && ./bin/hdtest
137
+
138
+ - name : HD Test (MySQL)
139
+ working-directory : ./hdtest
140
+ env :
141
+ PORT : ${{ job.services.mysql.ports[3306] }}
142
+ run : |
143
+ dub build --config=MySQL && ./bin/hdtest --host=127.0.0.1 --port=$PORT --database=hdtest --user=testuser --password=passw0rd
144
+
145
+ - name : HD Test (Postgres)
146
+ working-directory : ./hdtest
147
+ env :
148
+ PORT : ${{ job.services.postgres.ports[5432] }}
149
+ run : |
150
+ dub build --config=PGSQL && ./bin/hdtest --host=127.0.0.1 --port=$PORT --database=hdtest --user=testuser --password=passw0rd
68
151
69
- - name : run the hdtest project
70
- working-directory : hdtest
71
- run : dub --config=SQLite
0 commit comments