Skip to content

Commit 67fa6f2

Browse files
committed
Migrate from CircleCI to GitLab CI
Motivation: Now that the project has migrated from GitHub, it can now fully use GitLab CI. Modifications: Removed `circle.yml` and added `.gitlab-ci.yml` files Result: GitLab CI should be fully supported
1 parent a765914 commit 67fa6f2

File tree

3 files changed

+57
-43
lines changed

3 files changed

+57
-43
lines changed

.gitlab-ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

Tests/RedisNIOTests/Utilities/RedisConnection.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
import Foundation
1516
@testable import RedisNIO
1617

1718
extension Redis {
1819
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+
)
2025
}
2126
}

circle.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)