diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2071596 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..68f3804 --- /dev/null +++ b/Makefile @@ -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} diff --git a/README.md b/README.md index 4f47b6e..29d99af 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/SwiftUIChart.xctestplan b/SwiftUIChart.xctestplan new file mode 100644 index 0000000..38b183d --- /dev/null +++ b/SwiftUIChart.xctestplan @@ -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 +} diff --git a/SwiftUIChart.xcworkspace/xcshareddata/xcschemes/SwiftUI Chart.xcscheme b/SwiftUIChart.xcworkspace/xcshareddata/xcschemes/SwiftUI Chart.xcscheme new file mode 100644 index 0000000..5d55a38 --- /dev/null +++ b/SwiftUIChart.xcworkspace/xcshareddata/xcschemes/SwiftUI Chart.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +