This repository was archived by the owner on Oct 17, 2021. It is now read-only.
File tree 7 files changed +99
-26
lines changed
Tests/SwiftSemanticsTests
7 files changed +99
-26
lines changed Original file line number Diff line number Diff line change 7
7
branches : [master]
8
8
9
9
jobs :
10
- macos :
11
- runs-on : macOS-latest
10
+ macos_big_sur :
11
+ runs-on : macos-11.0
12
+
13
+ strategy :
14
+ matrix :
15
+ xcode :
16
+ - " 11.7" # Swift 5.2
17
+ - " 12.2" # Swift 5.3
18
+
19
+ name : " macOS Big Sur (Xcode ${{ matrix.xcode }})"
12
20
13
21
steps :
14
22
- name : Checkout
15
23
uses : actions/checkout@v1
24
+ - uses : actions/cache@v2
25
+ with :
26
+ path : .build
27
+ key : ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-
16
30
- name : Build and Test
17
- run : swift test
31
+ run : |
32
+ swift test
18
33
env :
19
- DEVELOPER_DIR : /Applications/Xcode_11.4.app/Contents/Developer
34
+ DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
35
+
36
+ macos_catalina :
37
+ runs-on : macos-10.15
38
+
39
+ strategy :
40
+ matrix :
41
+ xcode :
42
+ - " 11.7" # Swift 5.2
43
+ - " 12" # Swift 5.3
44
+
45
+ name : " macOS Catalina (Xcode ${{ matrix.xcode }})"
46
+
47
+ steps :
48
+ - name : Checkout
49
+ uses : actions/checkout@v1
50
+ - uses : actions/cache@v2
51
+ with :
52
+ path : .build
53
+ key : ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
54
+ restore-keys : |
55
+ ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-
56
+ - name : Build and Test
57
+ run : |
58
+ swift test
59
+ env :
60
+ DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
20
61
21
62
linux :
22
63
runs-on : ubuntu-latest
23
64
65
+ strategy :
66
+ matrix :
67
+ swift : ["5.3", "5.2"]
68
+
69
+ name : " Linux (Swift ${{ matrix.swift }})"
70
+
24
71
container :
25
- image : swift:5.2
72
+ image : swift:${{ matrix.swift }}
26
73
27
74
steps :
28
75
- name : Checkout
29
76
uses : actions/checkout@v1
77
+ - uses : actions/cache@v2
78
+ with :
79
+ path : .build
80
+ key : ${{ runner.os }}-spm-swift-${{ matrix.swift }}-${{ hashFiles('**/Package.resolved') }}
81
+ restore-keys : |
82
+ ${{ runner.os }}-spm-swift-${{ matrix.swift }}-
30
83
- name : Build and Test
31
- run : swift test --enable-test-discovery
84
+ run : |
85
+ swift test --enable-test-discovery
Original file line number Diff line number Diff line change 4
4
/* .xcodeproj
5
5
.swiftpm /
6
6
xcuserdata /
7
+ Package.resolved
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- // swift-tools-version:5.1
1
+ // swift-tools-version:5.3
2
2
// The swift-tools-version declares the minimum version of Swift required to build this package.
3
3
4
4
import PackageDescription
@@ -14,7 +14,9 @@ let package = Package(
14
14
] ,
15
15
dependencies: [
16
16
// Dependencies declare other packages that this package depends on.
17
- . package ( url: " https://github.com/apple/swift-syntax.git " , . exact( " 0.50200.0 " ) ) ,
17
+ . package ( name: " SwiftSyntax " ,
18
+ url: " https://github.com/apple/swift-syntax.git " ,
19
+ . exact( " 0.50300.0 " ) ) ,
18
20
] ,
19
21
targets: [
20
22
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Original file line number Diff line number Diff line change
1
+ // swift-tools-version:5.1
2
+ // The swift-tools-version declares the minimum version of Swift required to build this package.
3
+
4
+ import PackageDescription
5
+
6
+ let package = Package (
7
+ name: " SwiftSemantics " ,
8
+ products: [
9
+ // Products define the executables and libraries produced by a package, and make them visible to other packages.
10
+ . library(
11
+ name: " SwiftSemantics " ,
12
+ targets: [ " SwiftSemantics " ]
13
+ ) ,
14
+ ] ,
15
+ dependencies: [
16
+ // Dependencies declare other packages that this package depends on.
17
+ . package ( url: " https://github.com/apple/swift-syntax.git " ,
18
+ . exact( " 0.50200.0 " ) ) ,
19
+ ] ,
20
+ targets: [
21
+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
22
+ // Targets can depend on other targets in this package, and on products in packages which this package depends on.
23
+ . target(
24
+ name: " SwiftSemantics " ,
25
+ dependencies: [ " SwiftSyntax " ]
26
+ ) ,
27
+ . testTarget(
28
+ name: " SwiftSemanticsTests " ,
29
+ dependencies: [ " SwiftSemantics " ]
30
+ ) ,
31
+ ]
32
+ )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ final class DeclarationCollectorTests: XCTestCase {
21
21
22
22
let collector = DeclarationCollector ( )
23
23
let tree = try SyntaxParser . parse ( source: source)
24
- _ = collector. walk ( tree)
24
+ collector. walk ( tree)
25
25
26
26
XCTAssertEqual ( collector. imports. count, 1 )
27
27
XCTAssertEqual ( collector. imports. first? . pathComponents, [ " UIKit " ] )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ extension SyntaxParser {
6
6
static func declarations< T: Declaration > ( of type: T . Type , source: String ) throws -> [ T ] {
7
7
let collector = DeclarationCollector ( )
8
8
let tree = try parse ( source: source)
9
- _ = collector. walk ( tree)
9
+ collector. walk ( tree)
10
10
11
11
switch type {
12
12
case is AssociatedType . Type :
You can’t perform that action at this time.
0 commit comments