@@ -2,6 +2,47 @@ name: Unit tests
2
2
3
3
on :
4
4
workflow_call :
5
+ inputs :
6
+ linux_5_9_enabled :
7
+ type : boolean
8
+ description : " Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
9
+ default : true
10
+ linux_5_9_arguments_override :
11
+ type : string
12
+ description : " The arguments passed to swift test in the Linux 5.9 Swift version matrix job."
13
+ default : " "
14
+ linux_5_10_enabled :
15
+ type : boolean
16
+ description : " Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
17
+ default : true
18
+ linux_5_10_arguments_override :
19
+ type : string
20
+ description : " The arguments passed to swift test in the Linux 5.10 Swift version matrix job."
21
+ default : " "
22
+ linux_6_0_enabled :
23
+ type : boolean
24
+ description : " Boolean to enable the Linux 6.0 Swift version matrix job. Defaults to true."
25
+ default : true
26
+ linux_6_0_arguments_override :
27
+ type : string
28
+ description : " The arguments passed to swift test in the Linux 6.0 Swift version matrix job."
29
+ default : " "
30
+ linux_nightly_6_0_enabled :
31
+ type : boolean
32
+ description : " Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
33
+ default : true
34
+ linux_nightly_6_0_arguments_override :
35
+ type : string
36
+ description : " The arguments passed to swift test in the Linux nightly 6.0 Swift version matrix job."
37
+ default : " "
38
+ linux_nightly_main_enabled :
39
+ type : boolean
40
+ description : " Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
41
+ default : true
42
+ linux_nightly_main_arguments_override :
43
+ type : string
44
+ description : " The arguments passed to swift test in the Linux nightly main Swift version matrix job."
45
+ default : " "
5
46
6
47
jobs :
7
48
unit-tests :
@@ -14,19 +55,19 @@ jobs:
14
55
swift :
15
56
- image : " swift:5.9-jammy"
16
57
swift_version : " 5.9"
17
- enabled : true
58
+ enabled : ${{ inputs.linux_5_9_enabled }}
18
59
- image : " swift:5.10-jammy"
19
60
swift_version : " 5.10"
20
- enabled : true
61
+ enabled : ${{ inputs.linux_5_10_enabled }}
21
62
- image : " swift:6.0-jammy"
22
63
swift_version : " 6.0"
23
- enabled : true
64
+ enabled : ${{ inputs.linux_6_0_enabled }}
24
65
- image : " swiftlang/swift:nightly-6.0-jammy"
25
66
swift_version : " nightly-6.0"
26
- enabled : true
67
+ enabled : ${{ inputs.linux_nightly_6_0_enabled }}
27
68
- image : " swiftlang/swift:nightly-main-jammy"
28
69
swift_version : " nightly-main"
29
- enabled : true
70
+ enabled : ${{ inputs.linux_nightly_main_enabled }}
30
71
steps :
31
72
- name : Checkout repository
32
73
if : ${{ matrix.swift.enabled }}
@@ -42,12 +83,12 @@ jobs:
42
83
if : ${{ matrix.swift.enabled }}
43
84
env :
44
85
SWIFT_VERSION : ${{ matrix.swift.swift_version }}
45
- COMMAND : " swift"
46
- COMMAND_OVERRIDE_5_9 : " swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete "
47
- COMMAND_OVERRIDE_5_10 : " swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete "
48
- COMMAND_OVERRIDE_6_0 : " swift test --explicit-target-dependency-import-check error "
49
- COMMAND_OVERRIDE_NIGHTLY_6_0 : " swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error "
50
- COMMAND_OVERRIDE_NIGHTLY_MAIN : " swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error "
86
+ COMMAND : " swift test "
87
+ COMMAND_OVERRIDE_5_9 : " swift test ${{ inputs.linux_5_9_arguments_override }} "
88
+ COMMAND_OVERRIDE_5_10 : " swift test ${{ inputs.linux_5_10_arguments_override }} "
89
+ COMMAND_OVERRIDE_6_0 : " swift test ${{ inputs.linux_6_0_arguments_override }} "
90
+ COMMAND_OVERRIDE_NIGHTLY_6_0 : " swift test ${{ inputs.linux_nightly_6_0_arguments_override }} "
91
+ COMMAND_OVERRIDE_NIGHTLY_MAIN : " swift test ${{ inputs.linux_nightly_main_arguments_override }} "
51
92
run : |
52
93
apt-get -qq update && apt-get -qq -y install curl && apt-get -y install libsasl2-dev
53
94
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.sh | bash
0 commit comments