File tree Expand file tree Collapse file tree 3 files changed +57
-43
lines changed
Tests/RedisNIOTests/Utilities Expand file tree Collapse file tree 3 files changed +57
-43
lines changed Original file line number Diff line number Diff line change
1
+ stages :
2
+ - build release
3
+ - test
4
+ - docs
5
+
6
+ pages :
7
+ stage : docs
8
+ only :
9
+ - tags
10
+ tags :
11
+ - private-xcode
12
+ script :
13
+ - " echo 'TODO #45 -- Publish API Docs'"
14
+
15
+ .build :
16
+ stage : build release
17
+ tags :
18
+ - docker
19
+ script :
20
+ - swift build -c release -v
21
+
22
+ build ubuntu-xenial :
23
+ extends : .build
24
+ image : swift:5.0-xenial
25
+
26
+ build ubuntu-bionic :
27
+ extends : .build
28
+ image : swift:5.0-bionic
29
+
30
+ .test :
31
+ stage : test
32
+ tags :
33
+ - docker
34
+ variables :
35
+ REDIS_URL : ' redis'
36
+ REDIS_PW : ' password'
37
+ services :
38
+ - name : redis:5
39
+ alias : ' redis'
40
+ command : ["redis-server", "--requirepass", "password"]
41
+ script :
42
+ - swift build -v
43
+ - swift test
44
+
45
+ test ubuntu-xenial :
46
+ extends : .test
47
+ image : swift:5.0-xenial
48
+
49
+ test ubuntu-bionic :
50
+ extends : .test
51
+ image : swift:5.0-bionic
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
+ import Foundation
15
16
@testable import RedisNIO
16
17
17
18
extension Redis {
18
19
static func makeConnection( ) throws -> EventLoopFuture < RedisConnection > {
19
- return Redis . makeConnection ( to: try . init( ipAddress: " 127.0.0.1 " , port: 6379 ) )
20
+ let env = ProcessInfo . processInfo. environment
21
+ return Redis . makeConnection (
22
+ to: try . makeAddressResolvingHost( env [ " REDIS_URL " ] ?? " 127.0.0.1 " , port: 6379 ) ,
23
+ password: env [ " REDIS_PW " ]
24
+ )
20
25
}
21
26
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments