Skip to content

Commit

Permalink
Beta support for Swift Testing
Browse files Browse the repository at this point in the history
- Support swift-snapshot-testing from 1.17.1
- Aligns vendored fork of swift-macro-testing with upstream 0.5.0
- Add support for SnapshotTesting's `Record` configuration
- Replace `isRecording` with `record` parameter in public API
- Refactor `assertMacro` to use `withSnapshotTesting`
- Update error handling to use `recordIssue` instead of `XCTFail`
- Update CI workflow to set SNAPSHOT_TESTING_RECORD environment variable
- Bump swift-snapshot-testing and swift-syntax dependencies
  • Loading branch information
gohanlon committed Jul 10, 2024
1 parent 63327d2 commit a2d6de7
Show file tree
Hide file tree
Showing 4 changed files with 322 additions and 264 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ on:
- main
pull_request:
branches:
- '*'
- "*"
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
SNAPSHOT_TESTING_RECORD: "never"

jobs:
macos:
name: macOS
runs-on: macos-13
strategy:
matrix:
swift-syntax-version: ['509.0.0..<510.0.0', '510.0.0..<511.0.0']
swift-syntax-version: ["509.0.0..<510.0.0", "510.0.0..<511.0.0"]

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "625ccca8570773dd84a34ee51a81aa2bc5a4f97a",
"version" : "1.16.0"
"revision" : "63d3b45dd249878a41c56274a748ca2c1c9c5230",
"version" : "1.17.1"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "fa8f95c2d536d6620cc2f504ebe8a6167c9fc2dd",
"version" : "510.0.1"
"revision" : "303e5c5c36d6a558407d364878df131c3546fad8",
"version" : "510.0.2"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.15.0"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.17.1"),
//.conditionalPackage(url: "https://github.com/apple/swift-syntax", envVar: "SWIFT_SYNTAX_VERSION", default: "509.0.0..<510.0.0")
//.conditionalPackage(url: "https://github.com/apple/swift-syntax", envVar: "SWIFT_SYNTAX_VERSION", default: "510.0.0..<511.0.0")
.conditionalPackage(
Expand Down
Loading

0 comments on commit a2d6de7

Please sign in to comment.