Skip to content
This repository was archived by the owner on Dec 30, 2021. It is now read-only.

Commit b82345e

Browse files
authored
Merge pull request #1 from gonzalezreal/ci
Add CI job
2 parents d0e79e6 + e628372 commit b82345e

File tree

14 files changed

+236
-32
lines changed

14 files changed

+236
-32
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- '*'
9+
jobs:
10+
tests:
11+
runs-on: macOS-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Select Xcode 12
15+
run: sudo xcode-select -s /Applications/Xcode_12.app
16+
- name: Run tests
17+
run: make test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ playground.xcworkspace
4444
#
4545
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
4646
# hence it is not needed unless you have added a package configuration file to your project
47-
.swiftpm
47+
# .swiftpm
4848

4949
.build/
5050

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1200"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "AdaptiveCardUI_AdaptiveCardUI"
18+
BuildableName = "AdaptiveCardUI_AdaptiveCardUI"
19+
BlueprintName = "AdaptiveCardUI_AdaptiveCardUI"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "AdaptiveCardUI"
32+
BuildableName = "AdaptiveCardUI"
33+
BlueprintName = "AdaptiveCardUI"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
<BuildActionEntry
38+
buildForTesting = "YES"
39+
buildForRunning = "YES"
40+
buildForProfiling = "NO"
41+
buildForArchiving = "NO"
42+
buildForAnalyzing = "YES">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "AdaptiveCardUITests"
46+
BuildableName = "AdaptiveCardUITests"
47+
BlueprintName = "AdaptiveCardUITests"
48+
ReferencedContainer = "container:">
49+
</BuildableReference>
50+
</BuildActionEntry>
51+
</BuildActionEntries>
52+
</BuildAction>
53+
<TestAction
54+
buildConfiguration = "Debug"
55+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57+
shouldUseLaunchSchemeArgsEnv = "YES">
58+
<Testables>
59+
<TestableReference
60+
skipped = "NO">
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "AdaptiveCardUITests"
64+
BuildableName = "AdaptiveCardUITests"
65+
BlueprintName = "AdaptiveCardUITests"
66+
ReferencedContainer = "container:">
67+
</BuildableReference>
68+
</TestableReference>
69+
</Testables>
70+
</TestAction>
71+
<LaunchAction
72+
buildConfiguration = "Debug"
73+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
74+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
75+
launchStyle = "0"
76+
useCustomWorkingDirectory = "NO"
77+
ignoresPersistentStateOnLaunch = "NO"
78+
debugDocumentVersioning = "YES"
79+
debugServiceExtension = "internal"
80+
allowLocationSimulation = "YES">
81+
</LaunchAction>
82+
<ProfileAction
83+
buildConfiguration = "Release"
84+
shouldUseLaunchSchemeArgsEnv = "YES"
85+
savedToolIdentifier = ""
86+
useCustomWorkingDirectory = "NO"
87+
debugDocumentVersioning = "YES">
88+
<MacroExpansion>
89+
<BuildableReference
90+
BuildableIdentifier = "primary"
91+
BlueprintIdentifier = "AdaptiveCardUI_AdaptiveCardUI"
92+
BuildableName = "AdaptiveCardUI_AdaptiveCardUI"
93+
BlueprintName = "AdaptiveCardUI_AdaptiveCardUI"
94+
ReferencedContainer = "container:">
95+
</BuildableReference>
96+
</MacroExpansion>
97+
</ProfileAction>
98+
<AnalyzeAction
99+
buildConfiguration = "Debug">
100+
</AnalyzeAction>
101+
<ArchiveAction
102+
buildConfiguration = "Release"
103+
revealArchiveInOrganizer = "YES">
104+
</ArchiveAction>
105+
</Scheme>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1200"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "AdaptiveCardUI_AdaptiveCardUI"
18+
BuildableName = "AdaptiveCardUI_AdaptiveCardUI"
19+
BlueprintName = "AdaptiveCardUI_AdaptiveCardUI"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "AdaptiveCardUI"
32+
BuildableName = "AdaptiveCardUI"
33+
BlueprintName = "AdaptiveCardUI"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<Testables>
45+
</Testables>
46+
</TestAction>
47+
<LaunchAction
48+
buildConfiguration = "Debug"
49+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
50+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
51+
launchStyle = "0"
52+
useCustomWorkingDirectory = "NO"
53+
ignoresPersistentStateOnLaunch = "NO"
54+
debugDocumentVersioning = "YES"
55+
debugServiceExtension = "internal"
56+
allowLocationSimulation = "YES">
57+
</LaunchAction>
58+
<ProfileAction
59+
buildConfiguration = "Release"
60+
shouldUseLaunchSchemeArgsEnv = "YES"
61+
savedToolIdentifier = ""
62+
useCustomWorkingDirectory = "NO"
63+
debugDocumentVersioning = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "AdaptiveCardUI_AdaptiveCardUI"
68+
BuildableName = "AdaptiveCardUI_AdaptiveCardUI"
69+
BlueprintName = "AdaptiveCardUI_AdaptiveCardUI"
70+
ReferencedContainer = "container:">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
</ProfileAction>
74+
<AnalyzeAction
75+
buildConfiguration = "Debug">
76+
</AnalyzeAction>
77+
<ArchiveAction
78+
buildConfiguration = "Release"
79+
revealArchiveInOrganizer = "YES">
80+
</ArchiveAction>
81+
</Scheme>

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
DESTINATION_IOS = platform=iOS Simulator,OS=14.0,name=iPhone 8
2+
DESTINATION_TVOS = platform=tvOS Simulator,OS=14.0,name=Apple TV
3+
DESTINATION_WATCHOS = platform=watchOS Simulator,OS=7.0,name=Apple Watch Series 4 - 40mm
4+
5+
default: test
6+
7+
test:
8+
xcodebuild test \
9+
-scheme AdaptiveCardUI \
10+
-destination '$(DESTINATION_IOS)'
11+
xcodebuild test \
12+
-scheme AdaptiveCardUI \
13+
-destination '$(DESTINATION_TVOS)'
14+
xcodebuild \
15+
-scheme AdaptiveCardUI_watchOS \
16+
-destination '$(DESTINATION_WATCHOS)'

Sources/AdaptiveCardUI/UI/FactSet/EnvironmentValues+FactStyle.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
import SwiftUI
44

5-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
5+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
66
public extension EnvironmentValues {
77
var factStyle: FactStyle {
88
get { self[FactStyleKey.self] }
99
set { self[FactStyleKey.self] = newValue }
1010
}
1111
}
1212

13-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
13+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
1414
public extension View {
1515
func factStyle(_ factStyle: FactStyle) -> some View {
1616
environment(\.factStyle, factStyle)
1717
}
1818
}
1919

20-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
20+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
2121
private struct FactStyleKey: EnvironmentKey {
2222
static let defaultValue: FactStyle = SystemFactStyle()
2323
}

Sources/AdaptiveCardUI/UI/Text/EnvironmentValues+TextStyle.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
import SwiftUI
44

5-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
5+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
66
public extension EnvironmentValues {
77
var textStyle: TextStyle {
88
get { self[TextStyleKey.self] }
99
set { self[TextStyleKey.self] = newValue }
1010
}
1111
}
1212

13-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
13+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
1414
public extension View {
1515
func textStyle(_ textStyle: TextStyle) -> some View {
1616
environment(\.textStyle, textStyle)
1717
}
1818
}
1919

20-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
20+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
2121
private struct TextStyleKey: EnvironmentKey {
2222
static let defaultValue: TextStyle = SystemTextStyle()
2323
}

Sources/AdaptiveCardUI/UI/Text/SystemTextStyle.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import SwiftUI
44

5-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
5+
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)
66
public struct SystemTextStyle: TextStyle {
77
public init() {}
88

@@ -13,13 +13,13 @@
1313
case .medium:
1414
return .system(.body, design: Font.Design(fontType))
1515
case .large:
16-
if #available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) {
16+
if #available(macOS 11.0, iOS 14.0, tvOS 14.0, *) {
1717
return .system(.title3, design: Font.Design(fontType))
1818
} else {
1919
return .system(.title, design: Font.Design(fontType))
2020
}
2121
case .extraLarge:
22-
if #available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) {
22+
if #available(macOS 11.0, iOS 14.0, tvOS 14.0, *) {
2323
return .system(.title, design: Font.Design(fontType))
2424
} else {
2525
return .system(.largeTitle, design: Font.Design(fontType))

Tests/AdaptiveCardUITests/UI/RichTextBlockRenderingTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
let view = AdaptiveCardView(url: fixtureURL("richTextBlock.json"))
1313
.animation(nil)
1414
.adaptiveCardConfiguration(HostConfig())
15-
.environment(\.locale, Locale(identifier: "en_US"))
1615

1716
let vc = UIHostingController(rootView: view)
1817
vc.view.frame = CGRect(x: 0, y: 0, width: 375, height: 300)

0 commit comments

Comments
 (0)