Skip to content

Commit

Permalink
Merge pull request #2 from mercari/work/ci
Browse files Browse the repository at this point in the history
Setup CI with GitHub Actions
  • Loading branch information
andooown authored Sep 4, 2023
2 parents 7249630 + a42d2e4 commit 3e65264
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- main
pull_request:

env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app

jobs:
build:
name: Build
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Build
run: set -o pipefail && make build-library | xcpretty

test:
name: Test
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Test
run: set -o pipefail && make test-library | xcpretty

build-example:
name: Build Example app
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Build
run: set -o pipefail && make build-example | xcpretty
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
WORKSPACE_PATH := SwiftUIChart.xcworkspace

LIBRARY_SCHEME := "SwiftUI Chart"
EXAMPLE_APP_SCHEME := Example

DESTINATION_TARGET := platform="iOS Simulator,name=iPhone 14 Pro,OS=16.4"


.PHONY: open
open:
open ${WORKSPACE_PATH}

.PHONY: build-library
build-library:
@xcodebuild build \
-workspace ${WORKSPACE_PATH} \
-scheme ${LIBRARY_SCHEME} \
-destination ${DESTINATION_TARGET}

.PHONY: test-library
test-library:
@xcodebuild test \
-workspace ${WORKSPACE_PATH} \
-scheme ${LIBRARY_SCHEME} \
-destination ${DESTINATION_TARGET}

.PHONY: build-example
build-example:
@xcodebuild build \
-workspace ${WORKSPACE_PATH} \
-scheme ${EXAMPLE_APP_SCHEME} \
-destination ${DESTINATION_TARGET}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SwiftUI Chart
# SwiftUI Chart [![CI](https://github.com/mercari/swiftui-chart/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mercari/swiftui-chart/actions/workflows/ci.yml)

This is a library to build charts in SwiftUI. This enables you to build charts with SwiftUI primitive `View` or `Shape` components, and simple declarative APIs.

Expand Down
31 changes: 31 additions & 0 deletions SwiftUIChart.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"configurations" : [
{
"id" : "7C60ABA9-5C92-4774-90CC-FF681D51F465",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {
"testTimeoutsEnabled" : true
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"identifier" : "ChartCoreTests",
"name" : "ChartCoreTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "LineChartTests",
"name" : "LineChartTests"
}
}
],
"version" : 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ChartCore"
BuildableName = "ChartCore"
BlueprintName = "ChartCore"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "LineChart"
BuildableName = "LineChart"
BlueprintName = "LineChart"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:SwiftUIChart.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ChartCore"
BuildableName = "ChartCore"
BlueprintName = "ChartCore"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

0 comments on commit 3e65264

Please sign in to comment.