Skip to content

Commit

Permalink
Merge pull request #3 from Rallista/github-testing-action.yml
Browse files Browse the repository at this point in the history
Added test.yml Github Action
  • Loading branch information
Archdoog authored Nov 2, 2023
2 parents 7fc420a + 0ed50dd commit 529096f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test maplibre-swiftui-dsl-playground

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: macos-13
strategy:
matrix:
scheme: [
MapLibreSwiftUI-Package
]
destination: [
# TODO: Add more destinations
'platform=iOS Simulator,name=iPhone 15,OS=17.0.1'
]

steps:
- name: Install xcbeautify
run: brew install xcbeautify

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'

- name: Checkout maplibre-swiftui-dsl-playground
uses: actions/checkout@v3

- name: Test ${{ matrix.scheme }} on ${{ matrix.destination }}
run: xcodebuild -scheme ${{ matrix.scheme }} test -skipMacroValidation -destination '${{ matrix.destination }}' | xcbeautify && exit ${PIPESTATUS[0]}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MapLibreSwiftMacrosTests"
BuildableName = "MapLibreSwiftMacrosTests"
BlueprintName = "MapLibreSwiftMacrosTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
37 changes: 27 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ let package = Package(
.library(
name: "MapLibreSwiftDSL",
targets: ["MapLibreSwiftDSL"]),
.library(name: "MapLibre", targets: ["MapLibre"])
.library(
name: "MapLibre",
targets: ["MapLibre"])
],
dependencies: [
// .package(url: "https://github.com/maplibre/maplibre-gl-native-distribution", .upToNextMajor(from: "5.13.0")),
.package(url: "https://github.com/apple/swift-syntax.git", .upToNextMajor(from: "509.0.0")),
.package(url: "https://github.com/pointfreeco/swift-macro-testing", .upToNextMinor(from: "0.1.0")),

],
targets: [
.macro(
Expand All @@ -35,11 +36,15 @@ let package = Package(
),
.target(
name: "MapLibreSwiftMacros",
dependencies: [.target(name: "MapLibreSwiftMacrosImpl")]
dependencies: [
.target(name: "MapLibreSwiftMacrosImpl")
]
),
.binaryTarget(
name: "MapLibre",
url: "https://github.com/maplibre/maplibre-native/releases/download/ios-v6.0.0-preda45706601c7ccc6d922a8fcddfc62ff7c8f480d/MapLibre.dynamic.xcframework.zip",
checksum: "37e621c0c7c1f589f0a125816155ba443000d78b80649d85a9b8b3d19144836c"
),
.binaryTarget(name: "MapLibre",
url: "https://github.com/maplibre/maplibre-native/releases/download/ios-v6.0.0-preda45706601c7ccc6d922a8fcddfc62ff7c8f480d/MapLibre.dynamic.xcframework.zip",
checksum: "37e621c0c7c1f589f0a125816155ba443000d78b80649d85a9b8b3d19144836c"),
.target(
name: "MapLibreSwiftUI",
dependencies: [
Expand All @@ -53,15 +58,27 @@ let package = Package(
.target(name: "InternalUtils"),
.target(name: "MapLibre"),
.target(name: "MapLibreSwiftMacros"),
]),
.target(name: "InternalUtils"),
]
),
.target(
name: "InternalUtils"
),

// MARK: Tests

.testTarget(
name: "MapLibreSwiftDSLTests",
dependencies: [
"MapLibreSwiftDSL",
"MapLibreSwiftDSL"
]
),
.testTarget(
name: "MapLibreSwiftMacrosTests",
dependencies: [
"MapLibreSwiftMacrosImpl",
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
.product(name: "MacroTesting", package: "swift-macro-testing"),
]),
]
),
]
)

0 comments on commit 529096f

Please sign in to comment.