Skip to content

Commit c9fe844

Browse files
Adding additional CI Tests (#52)
2 parents d202982 + 85534b0 commit c9fe844

File tree

7 files changed

+125
-31
lines changed

7 files changed

+125
-31
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: Experimental Tests
5+
6+
on:
7+
pull_request:
8+
branches: [ ]
9+
10+
jobs:
11+
windows-swift-test:
12+
name: latest Windows swift tests
13+
runs-on: windows-latest
14+
steps:
15+
- uses: compnerd/gha-setup-swift@main
16+
with:
17+
branch: swift-6.0-release
18+
tag: 6.0-RELEASE
19+
- uses: actions/checkout@v4
20+
- name: Build
21+
run: swift build -v
22+
- name: Run swift tests
23+
run: swift test -v

.github/workflows/ios-tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: iOS Tests
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
ios-18-test:
14+
name: iOS 18 tests
15+
runs-on: macos-15
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: iOS 18
19+
env:
20+
scheme: ${{ 'CodableWrappers' }}
21+
platform: ${{ 'iOS Simulator' }}
22+
OS: ${{ '18.2' }}
23+
device_name: ${{ 'iPhone 16 Pro' }}
24+
run: |
25+
xcodebuild test -scheme "$scheme" -destination "platform=$platform,OS=$OS,name=$device_name"
26+
27+
ios-17-test:
28+
name: iOS 17 tests
29+
runs-on: macos-15
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: iOS 17
33+
env:
34+
scheme: ${{ 'CodableWrappers' }}
35+
platform: ${{ 'iOS Simulator' }}
36+
OS: ${{ '17.5' }}
37+
device_name: ${{ 'iPhone 15 Pro' }}
38+
run: |
39+
xcodebuild test -scheme "$scheme" -destination "platform=$platform,OS=$OS,name=$device_name"
40+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: Multi-platform Tests
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
macos-15-sequoia-swift-test:
14+
name: macOS 15 sequoia Swift tests
15+
runs-on: macos-15
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build
19+
run: swift build -v
20+
- name: Run swift tests
21+
run: swift test -v
22+
23+
macos-14-sonoma-swift-test:
24+
name: macOS 14 Sonoma swift tests
25+
runs-on: macos-14
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Build
29+
run: swift build -v
30+
- name: Run swift tests
31+
run: swift test -v
32+
33+
ubuntu-swift-test:
34+
name: latest Ubuntu swift tests
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Build
39+
run: swift build -v
40+
- name: Run swift tests
41+
run: swift test -v

.github/workflows/swift.yml

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

Tests/CodableWrappersTests/Encoder/EmptyDefaultsEncodingTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class EmptyDefaultsEncodingTests: QuickSpec, EncodingTestSpec {
4545
expect(encodedString).toNot(beNil())
4646

4747
if let actualString = encodedString {
48-
print(actualString)
4948
expect(actualString).to(haveEqualLines(to: valuesTestingJSON))
5049
}
5150
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import XCTest
22

3-
#if !canImport(ObjectiveC)
4-
public func allTests() -> [XCTestCaseEntry] {
5-
return [
6-
testCase(CodableWrappersTests.allTests),
7-
]
8-
}
9-
#endif
3+
//#if !canImport(ObjectiveC)
4+
//public func allTests() -> [XCTestCaseEntry] {
5+
// return [
6+
// testCase(CodableWrappersTests.allTests),
7+
// ]
8+
//}
9+
//#endif

Tests/LinuxMain.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@ import XCTest
22
import Quick
33

44
@testable import CodableWrappersTests
5+
//@testable import CodableWrapperMacrosTests
56

67
let allTestClasses = [
8+
// CodingKeyMacroErrorTests.self,
9+
// CodingKeyMacroTests.self,
10+
// CodingKeyPrefixSuffixTests.self,
11+
// KeyConverterTests.self,
12+
713
BoolDecodingTests.self,
814
CustomFloatingPointDecoderTests.self,
915
DataDecodingTests.self,
1016
DateDecodingTests.self,
1117
EmptyDefaultsDecodingTests.self,
1218
LossyCollectionDecodingTests.self,
1319
OptionalDecodingTests.self,
20+
1421
BoolEncodingTests.self,
1522
CustomFloatingPointEncoderTests.self,
1623
DataEncodingTests.self,
@@ -21,4 +28,10 @@ let allTestClasses = [
2128
CompositionTests.self,
2229
PartialImplementationTests.self,
2330
]
24-
Quick.QCKMain(allTestClasses)
31+
#if os(Linux)
32+
@main struct Main {
33+
static func main() {
34+
QCKMain(allTestClasses)
35+
}
36+
}
37+
#endif

0 commit comments

Comments
 (0)