@@ -63,12 +63,14 @@ jobs:
6363 name : Test BridgeJS against Swift versions
6464 strategy :
6565 matrix :
66- swift-image :
67- - " swift:6.1.2" # Tests with SwiftSyntax 601.x (non-SwiftSyntax602 code path)
68- - " swift:6.2" # Tests with SwiftSyntax 602.x (SwiftSyntax602 code path)
66+ entry :
67+ - image : " swift:6.1.2"
68+ swift-syntax-version : " 601.0.0"
69+ - image : " swift:6.2"
70+ swift-syntax-version : " 602.0.0"
6971 runs-on : ubuntu-latest
7072 container :
71- image : ${{ matrix.swift- image }}
73+ image : ${{ matrix.entry. image }}
7274 steps :
7375 - uses : actions/checkout@v6
7476 - name : Setup Node.js
@@ -77,18 +79,12 @@ jobs:
7779 node-version : ' 20'
7880 - name : Install TypeScript
7981 run : npm install --prefix Plugins/BridgeJS/Sources/TS2Swift/JavaScript
80- - name : Force SwiftSyntax 602 for Swift 6.2
81- if : matrix.swift-image == 'swift:6.2'
82- working-directory : Plugins/BridgeJS
83- run : |
84- # Force SwiftSyntax 602.x to test the SwiftSyntax602 code path
85- sed -i 's/from: "600.0.1"/from: "602.0.0"/' Package.swift
86- # Clean any cached resolution
87- rm -rf .build Package.resolved
8882 - name : Run BridgeJS tests
8983 # NOTE: Seems like the prebuilt SwiftSyntax binaries are not compatible with
9084 # non-macro dependents, so disable experimental prebuilts for now.
9185 run : swift test --disable-experimental-prebuilts --package-path ./Plugins/BridgeJS
86+ env :
87+ BRIDGEJS_OVERRIDE_SWIFT_SYNTAX_VERSION : ${{ matrix.entry.swift-syntax-version }}
9288
9389 native-build :
9490 # Check native build to make it easy to develop applications by Xcode
0 commit comments