diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2658cd290..eeeb920f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,11 +13,26 @@ jobs: spm-build-test: runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer steps: - uses: actions/checkout@v2 - - name: Build unit test target - run: swift build - - name: Run unit test target - run: swift test --enable-code-coverage + - name: Remove AppAuth.xcodeproj + run: rm -rf AppAuth.xcodeproj + - name: Build unit test targets + run: | + xcodebuild build-for-testing \ + -scheme AppAuth-Package \ + -sdk 'iphonesimulator' \ + -destination 'platform=iOS Simulator,name=iPhone 11' \ + - name: Run unit test targets + run: | + xcodebuild test-without-building \ + -scheme AppAuth-Package \ + -sdk 'iphonesimulator' \ + -destination 'platform=iOS Simulator,name=iPhone 11' \ + -enableCodeCoverage YES \ + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \ + GCC_GENERATE_TEST_COVERAGE_FILES=YES - name: Upload coverage to Codecov uses: codecov/codecov-action@v2