Skip to content

Commit 764ef63

Browse files
committed
Run tuist on CI
1 parent 5c3bb38 commit 764ef63

6 files changed

Lines changed: 20 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ jobs:
7070
env:
7171
VALIDATOR_SUBSPEC: SQLCipher
7272
run: ./run-tests.sh
73+
- name: "Run tests (tuist)"
74+
run: |
75+
brew install tuist
76+
cd Tests/Tuist/SQLite-Test
77+
tuist install
78+
tuist test
7379
build-linux:
7480
runs-on: ubuntu-latest
7581
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ bin/
3030
Packages/
3131
.swiftpm/
3232
Package.resolved
33+
Derived/

Tests/Tuist/SQLite-Test/Project.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ let project = Project(
1717
]
1818
),
1919
buildableFolders: [
20-
"SQLite-Test/Sources",
21-
"SQLite-Test/Resources",
20+
"SQLite-Test/Sources"
2221
],
23-
dependencies: []
22+
dependencies: [.external(name: "SQLite")]
2423
),
2524
.target(
2625
name: "SQLite-TestTests",

Tests/Tuist/SQLite-Test/SQLite-Test/Sources/ContentView.swift

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import SwiftUI
2+
import SQLite
3+
4+
let connection = try! SQLite.Connection(.inMemory)
25

36
@main
47
struct SQLiteTestApp: App {
58
var body: some Scene {
69
WindowGroup {
7-
ContentView()
10+
Text("version: \(connection.sqliteVersion.description)").padding()
811
}
912
}
1013
}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import Testing
2-
@testable import SQLiteTest
2+
import SQLite
33

44
struct SQLiteTestTests {
55

6-
@Test func example() async throws {
7-
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
8-
}
6+
@Test func test_connection() async throws {
7+
let connection = try SQLite.Connection(.inMemory)
8+
let version = connection.sqliteVersion
9+
10+
#expect(version.major == 3)
911

12+
}
1013
}

0 commit comments

Comments
 (0)