Skip to content

Commit 22f7cc1

Browse files
authored
Merge pull request #109 from vapor/ci
circle ci 2
2 parents 809abc6 + f8ce35a commit 22f7cc1

File tree

4 files changed

+55
-18
lines changed

4 files changed

+55
-18
lines changed

.circleci/config.yml

Whitespace-only changes.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
Packages
33
*.xcodeproj
44
Package.pins
5+
Package.resolved
6+

Tests/MySQLTests/Utilities.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ extension MySQL.Database {
66
do {
77
let mysql = try MySQL.Database(
88
hostname: "127.0.0.1",
9-
user: "ubuntu",
9+
user: "root",
1010
password: "",
11-
database: "circle_test"
11+
database: "test"
1212
)
1313
let connection = try mysql.makeConnection()
1414
try connection.execute("SELECT @@version")
@@ -22,10 +22,10 @@ extension MySQL.Database {
2222
print("Error: \(error)")
2323
print()
2424
print("You must configure MySQL to run with the following configuration: ")
25-
print(" user: 'ubuntu'")
25+
print(" user: 'root'")
2626
print(" password: '' // (empty)")
2727
print(" host: '127.0.0.1'")
28-
print(" database: 'circle_test'")
28+
print(" database: 'test'")
2929
print()
3030

3131
print()

circle.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,49 @@
1-
machine:
2-
services:
3-
- mysql
4-
dependencies:
5-
override:
6-
- eval "$(curl -sL https://apt.vapor.sh)"
7-
- sudo apt-get install vapor cmysql
8-
- sudo chmod -R a+rx /usr/
9-
test:
10-
override:
11-
- swift build
12-
- swift build -c release
13-
- swift test
14-
1+
version: 2
2+
3+
jobs:
4+
macos:
5+
macos:
6+
xcode: "9.0"
7+
steps:
8+
- run: brew install vapor/tap/vapor vapor/tap/cmysql
9+
- run: brew services start mysql
10+
- checkout
11+
- run: swift build
12+
- run: swift test
13+
14+
linux:
15+
docker:
16+
- image: swift:4.0
17+
- image: mysql:5.7
18+
environment:
19+
MYSQL_ALLOW_EMPTY_PASSWORD: true
20+
MYSQL_DATABASE: test
21+
steps:
22+
- run: apt-get update
23+
- run: apt-get install -y libmysqlclient-dev libssl-dev
24+
- checkout
25+
- run: swift build
26+
- run: swift test
27+
28+
# 3.1 backward compat checks
29+
30+
linux-3:
31+
docker:
32+
- image: swift:3.1
33+
- image: mysql:5.7
34+
environment:
35+
MYSQL_ALLOW_EMPTY_PASSWORD: true
36+
MYSQL_DATABASE: test
37+
steps:
38+
- run: apt-get update
39+
- run: apt-get install -y libmysqlclient-dev libssl-dev
40+
- checkout
41+
- run: swift build
42+
- run: swift test
43+
44+
workflows:
45+
version: 2
46+
tests:
47+
jobs:
48+
- linux
49+
- linux-3

0 commit comments

Comments
 (0)