7
7
branches : [ "*" ]
8
8
9
9
jobs :
10
+
10
11
swiftformat-lint :
11
12
runs-on : ubuntu-latest
12
13
steps :
@@ -17,58 +18,47 @@ jobs:
17
18
url : https://github.com/nicklockwood/SwiftFormat
18
19
- name : Lint Sources
19
20
run : swiftformat --lint Sources
20
-
21
- macOS :
22
- runs-on : macos-latest
23
- steps :
24
- - uses : actions/checkout@v2
25
- - uses : actions/cache@v2
26
- with :
27
- path : .build
28
- key : ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
29
- restore-keys : |
30
- ${{ runner.os }}-spm-
31
- - name : Build
32
- run : swift build
33
- - name : Test
34
- run : swift test --skip K3d
35
-
36
21
iOS :
37
22
name : Test iOS
38
23
runs-on : macOS-latest
39
24
strategy :
40
25
matrix :
41
- destination : ["platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro"]
26
+ destination :
27
+ - " platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro"
28
+ - " platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro"
42
29
steps :
43
- - uses : actions/checkout@v2
44
- - uses : actions/cache@v2
45
- with :
46
- path : .build
47
- key : ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
48
- restore-keys : |
49
- ${{ runner.os }}-spm-
30
+ - name : Checkout
31
+ uses : actions/checkout@v2
50
32
- name : iOS - ${{ matrix.destination }}
51
33
run : set -o pipefail && xcodebuild -scheme SwiftkubeClient -destination "${{ matrix.destination }}" clean build | xcpretty
52
34
53
- linux :
54
- runs-on : ubuntu-latest
35
+ build :
36
+ name : Swift ${{ matrix.swift }} on ${{ matrix.os }}
37
+ runs-on : ${{ matrix.os }}
38
+ strategy :
39
+ matrix :
40
+ os : [ubuntu-latest, macos-latest]
41
+ swift : ["5.9", "5.10", "6.0"]
55
42
steps :
56
- - uses : actions/checkout@v2
57
- - uses : actions/cache@v2
43
+ - name : Checkout
44
+ uses : actions/checkout@v2
45
+ - name : SPM Cache
46
+ uses : actions/cache@v2
58
47
with :
59
48
path : .build
60
- key : ${{ runner .os }}-spm -${{ hashFiles('**/Package.resolved') }}
49
+ key : ${{ matrix .os }}-${{ matrix.swift }} -${{ hashFiles('**/Package.resolved') }}
61
50
restore-keys : |
62
- ${{ runner.os }}-spm-
63
- - name : Create cluster
64
- uses : AbsaOSS/k3d-action@v2
51
+ ${{ matrix.os }}-${{ matrix.swift }}-
52
+ - name : Start minikube
53
+ uses : medyagh/setup-minikube@latest
54
+ id : minikube
65
55
with :
66
- cluster-name : " swiftkube"
67
- args : -c k3d/swiftkube.yaml
68
- - name : Setup Swift
69
- uses : fwal/setup-swift@v1
56
+ minikube-version : 1.35.0
57
+ - uses : swift-actions/setup-swift@v2
70
58
with :
71
- swift-version : " 5.8"
59
+ swift-version : ${{ matrix.swift }}
60
+ - name : Get swift version
61
+ run : swift --version
72
62
- name : Build
73
63
run : swift build
74
64
- name : Test
0 commit comments