diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..94355b7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +--- +name: Test + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + test: + runs-on: macos-14 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '15.4' + + - name: Build and Test for iOS + run: | + # Build for iPhone Simulator using xcodebuild with Swift package + xcodebuild -scheme FDWaveformView \ + -destination "platform=iOS Simulator,name=iPhone 15,OS=17.5" \ + clean build + + # Run tests on iPhone Simulator + xcodebuild -scheme FDWaveformView \ + -destination "platform=iOS Simulator,name=iPhone 15,OS=17.5" \ + test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3fc367b..f04bfce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ All contributors are welcome. Please use issues and pull requests to contribute # Release Process -1. Confirm the build vorks (todo: set up GitHub Actions testing) +1. Confirm the build works (GitHub Actions testing is now set up and will validate builds) 2. Create a release commit, see [prior releases](https://github.com/fulldecent/FDWaveformView/releases) for an example 1. Update the change log to label the latest improvements under the new version name 2. Update the podspec version number diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index f824a82..2552895 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -291,7 +291,6 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; @@ -319,7 +318,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; + DEVELOPMENT_TEAM = 8Q693ZG5RN; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; diff --git a/Package.swift b/Package.swift index 5c6eba0..1522a73 100644 --- a/Package.swift +++ b/Package.swift @@ -5,6 +5,10 @@ import PackageDescription let package = Package( name: "FDWaveformView", + platforms: [ + .iOS(.v12), + .macOS(.v10_14) + ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. .library( diff --git a/README.md b/README.md index 83afb21..75b9036 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ self.waveform.doesAllowScroll = true ```swift UIView.animate(withDuration: 0.3) { let randomNumber = arc4random() % self.waveform.totalSamples - self.waveform.highlightedSamples = 0..