diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c35fc2e..512e2ca 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -8,7 +8,6 @@ on: env: SCHEME: CryptoWidgetKitApp - TEST_SCHEME: CryptoWidgetKitAppTests SIMULATOR: "iPhone 15" jobs: @@ -20,8 +19,8 @@ jobs: fail-fast: true matrix: # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - xcode_version: [ "15.0.1", "15.4" ] - os_version: [ "17.0.1", "17.5" ] + xcode_version: [ "15.4" ] + os_version: [ "17.0.1"] steps: - name: Checkout uses: actions/checkout@v3 @@ -39,6 +38,11 @@ jobs: - name: Test run: | xcodebuild \ - -scheme "$TEST_SCHEME" \ + -scheme "$SCHEME" \ -destination "platform=iOS Simulator,name=${SIMULATOR},OS=${{ matrix.os_version }}" \ - test \ No newline at end of file + -enableCodeCoverage YES \ + test + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/CryptoWidgetKitApp.xcodeproj/project.pbxproj b/CryptoWidgetKitApp.xcodeproj/project.pbxproj index a273ccb..1e1ece2 100644 --- a/CryptoWidgetKitApp.xcodeproj/project.pbxproj +++ b/CryptoWidgetKitApp.xcodeproj/project.pbxproj @@ -50,6 +50,7 @@ 4D8251C52C05EAD700DD32A3 /* HTTPMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = ""; }; 4D8251C72C05EBBB00DD32A3 /* MockURLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockURLSession.swift; sourceTree = ""; }; 4D8251C92C05EC4500DD32A3 /* URLSessionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionProtocol.swift; sourceTree = ""; }; + 4D8251E42C0F7B0300DD32A3 /* CryptoWidgetKitApp.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoWidgetKitApp.xctestplan; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -113,6 +114,7 @@ 4D7266592C049D820035E348 /* CryptoWidgetKitAppTests */ = { isa = PBXGroup; children = ( + 4D8251E42C0F7B0300DD32A3 /* CryptoWidgetKitApp.xctestplan */, 4D8251C02C05E9F100DD32A3 /* Mocks */, 4D8251C12C05E9FE00DD32A3 /* Network */, 4D72665A2C049D820035E348 /* CryptoWidgetKitAppTests.swift */, diff --git a/CryptoWidgetKitApp.xcodeproj/xcshareddata/xcschemes/CryptoWidgetKitApp.xcscheme b/CryptoWidgetKitApp.xcodeproj/xcshareddata/xcschemes/CryptoWidgetKitApp.xcscheme new file mode 100644 index 0000000..1e059c0 --- /dev/null +++ b/CryptoWidgetKitApp.xcodeproj/xcshareddata/xcschemes/CryptoWidgetKitApp.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CryptoWidgetKitAppTests/CryptoWidgetKitApp.xctestplan b/CryptoWidgetKitAppTests/CryptoWidgetKitApp.xctestplan new file mode 100644 index 0000000..d3b52a9 --- /dev/null +++ b/CryptoWidgetKitAppTests/CryptoWidgetKitApp.xctestplan @@ -0,0 +1,28 @@ +{ + "configurations" : [ + { + "id" : "9F0B5D53-33C8-4636-BB91-BF892799921C", + "name" : "Test Scheme Action", + "options" : { + + } + } + ], + "defaultOptions" : { + "targetForVariableExpansion" : { + "containerPath" : "container:CryptoWidgetKitApp.xcodeproj", + "identifier" : "4D7266452C049D800035E348", + "name" : "CryptoWidgetKitApp" + } + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:CryptoWidgetKitApp.xcodeproj", + "identifier" : "4D7266552C049D820035E348", + "name" : "CryptoWidgetKitAppTests" + } + } + ], + "version" : 1 +} diff --git a/README.md b/README.md index 0e00ff8..19ac449 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ # CryptoWidgetKitApp + +[![CodeFactor](https://www.codefactor.io/repository/github/josetorronteras/cryptowidgetkitapp/badge)](https://www.codefactor.io/repository/github/josetorronteras/cryptowidgetkitapp) + +[![iOS build and test workflow](https://github.com/josetorronteras/CryptoWidgetKitApp/actions/workflows/ios.yml/badge.svg?branch=main)](https://github.com/josetorronteras/CryptoWidgetKitApp/actions/workflows/ios.yml) + +[![codecov](https://codecov.io/gh/josetorronteras/CryptoWidgetKitApp/graph/badge.svg?token=5O0SZMNM97)](https://codecov.io/gh/josetorronteras/CryptoWidgetKitApp) \ No newline at end of file