diff --git a/.github/workflows/cocoapods.yml b/.github/workflows/cocoapods.yml index d4ea8ba..c92af65 100644 --- a/.github/workflows/cocoapods.yml +++ b/.github/workflows/cocoapods.yml @@ -1,8 +1,9 @@ name: Cocoapods -on: [pull_request, push] +on: push jobs: - build: + lint: + name: Lint runs-on: macOS-latest steps: - name: Checkout Code diff --git a/.github/workflows/swift-pacakge.yml b/.github/workflows/swift-pacakge.yml index e54e754..5b81c39 100644 --- a/.github/workflows/swift-pacakge.yml +++ b/.github/workflows/swift-pacakge.yml @@ -1,9 +1,11 @@ name: Build Swift Package -on: [pull_request, push] +on: push jobs: build: + name: Build runs-on: macOS-latest + steps: - name: Checkout Code uses: actions/checkout@v2 @@ -13,15 +15,26 @@ jobs: swift --version swift build -v + test: + name: Test + runs-on: macOS-latest + needs: build + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Test run: | swift test -v --enable-code-coverage - name: Generate Code Coverage File + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} run: | xcrun llvm-cov export --instr-profile=.build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/ProtocolProxyPackageTests.xctest/Contents/MacOS/ProtocolProxyPackageTests > ./info.lcov - name: Upload Code Coverage + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index db729e9..5f7b0e9 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -1,9 +1,11 @@ name: Build Xcode Project -on: [pull_request, push] +on: push jobs: - build: + ios: + name: iOS runs-on: macOS-latest + steps: - name: Checkout Code uses: actions/checkout@v2 @@ -16,26 +18,50 @@ jobs: run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk iphonesimulator -configuration Debug ONLY_ACTIVE_ARCH=YES - - name: Test iOS Simulator + - name: Test run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test - - name: Build Mac Catalyst + maccatalyst: + name: Mac Catalyst + runs-on: macOS-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Build run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk macosx -configuration Debug ONLY_ACTIVE_ARCH=YES - - name: Test Mac Catalyst + - name: Test run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test - - name: Build macOS + macos: + name: macOS + runs-on: macOS-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Build run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES - - name: Test macOS + - name: Test run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test + tvos: + name: tvOS + runs-on: macOS-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Build tvOS run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvos -configuration Debug ONLY_ACTIVE_ARCH=YES @@ -44,10 +70,18 @@ jobs: run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvsimulator -configuration Debug ONLY_ACTIVE_ARCH=YES - - name: Test tvOS Simulator + - name: Test run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test + watchos: + name: watchOS + runs-on: macOS-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Build watchOS run: | xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy watchOS" -sdk watchos -configuration Debug