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
This commit is contained in:
Nathan Harris
2019-06-06 12:43:18 -07:00
parent a765914e93
commit 67fa6f2f25
3 changed files with 57 additions and 43 deletions
+51
View File
@@ -0,0 +1,51 @@
stages:
- build release
- test
- docs
pages:
stage: docs
only:
- tags
tags:
- private-xcode
script:
- "echo 'TODO #45 -- Publish API Docs'"
.build:
stage: build release
tags:
- docker
script:
- swift build -c release -v
build ubuntu-xenial:
extends: .build
image: swift:5.0-xenial
build ubuntu-bionic:
extends: .build
image: swift:5.0-bionic
.test:
stage: test
tags:
- docker
variables:
REDIS_URL: 'redis'
REDIS_PW: 'password'
services:
- name: redis:5
alias: 'redis'
command: ["redis-server", "--requirepass", "password"]
script:
- swift build -v
- swift test
test ubuntu-xenial:
extends: .test
image: swift:5.0-xenial
test ubuntu-bionic:
extends: .test
image: swift:5.0-bionic
@@ -12,10 +12,15 @@
//
//===----------------------------------------------------------------------===//
import Foundation
@testable import RedisNIO
extension Redis {
static func makeConnection() throws -> EventLoopFuture<RedisConnection> {
return Redis.makeConnection(to: try .init(ipAddress: "127.0.0.1", port: 6379))
let env = ProcessInfo.processInfo.environment
return Redis.makeConnection(
to: try .makeAddressResolvingHost(env["REDIS_URL"] ?? "127.0.0.1", port: 6379),
password: env["REDIS_PW"]
)
}
}
-42
View File
@@ -1,42 +0,0 @@
version: 2
jobs:
test-ubuntu-bionic:
docker:
- image: swift:5.0-bionic
- image: redis:5
steps:
- checkout
- run: swift build
- run: swift test
test-ubuntu-xenial:
docker:
- image: swift:5.0-xenial
- image: redis:5
steps:
- checkout
- run: swift build
- run: swift test
build-ubuntu-bionic:
docker:
- image: swift:5.0-bionic
steps:
- checkout
- run: swift build -c release
build-ubuntu-xenial:
docker:
- image: swift:5.0-xenial
steps:
- checkout
- run: swift build -c release
workflows:
version: 2
tests:
jobs:
- test-ubuntu-bionic
- test-ubuntu-xenial
builds:
jobs:
- build-ubuntu-bionic
- build-ubuntu-xenial