From 546e862dfdd97db4585b6e711fd863316904dfa7 Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 01:43:38 -0700 Subject: [PATCH 1/6] Update tests.yml --- .github/workflows/tests.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2658cd290..2e296110d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,9 +15,18 @@ jobs: runs-on: macOS-latest 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: Build unit test targets + run: | + xcodebuild build-for-testing \ + -scheme AppAuth \ + -sdk 'iphonesimulator' \ + -destination 'platform=iOS Simulator,name=iPhone 11' \ + - name: Run unit test targets + run: | + xcodebuild test-without-building \ + -scheme AppAuth \ + -sdk 'iphonesimulator' \ + -destination 'platform=iOS Simulator,name=iPhone 11' \ + -enableCodeCoverage YES - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 From d2572da619226f6cd1d3210ff7fa94532f8afd59 Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 01:54:52 -0700 Subject: [PATCH 2/6] Remove AppAuth.xcodeproj to use SPM. --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e296110d..c4e308e9d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,8 @@ jobs: runs-on: macOS-latest steps: - uses: actions/checkout@v2 + - name: Remove AppAuth.xcodeproj + run: rm -rf AppAuth.xcodeproj - name: Build unit test targets run: | xcodebuild build-for-testing \ From 317c0f2a69f84932511be679706c940ce0df46df Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 02:13:41 -0700 Subject: [PATCH 3/6] Use xcodebuild test. --- .github/workflows/tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4e308e9d..977fc31b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,15 +17,9 @@ jobs: - uses: actions/checkout@v2 - name: Remove AppAuth.xcodeproj run: rm -rf AppAuth.xcodeproj - - name: Build unit test targets - run: | - xcodebuild build-for-testing \ - -scheme AppAuth \ - -sdk 'iphonesimulator' \ - -destination 'platform=iOS Simulator,name=iPhone 11' \ - name: Run unit test targets run: | - xcodebuild test-without-building \ + xcodebuild test \ -scheme AppAuth \ -sdk 'iphonesimulator' \ -destination 'platform=iOS Simulator,name=iPhone 11' \ From e73b2473c1153ce3f4a4670ccc1fa33ba3df54bd Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 02:42:17 -0700 Subject: [PATCH 4/6] Use AppAuth-Package. --- .github/workflows/tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 977fc31b5..37bea062d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,10 +17,16 @@ jobs: - uses: actions/checkout@v2 - 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 \ - -scheme AppAuth \ + xcodebuild test-without-building \ + -scheme AppAuth-Package \ -sdk 'iphonesimulator' \ -destination 'platform=iOS Simulator,name=iPhone 11' \ -enableCodeCoverage YES From dc9a436af1dff22deeab35b5392532ff2a8fad19 Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 09:12:31 -0700 Subject: [PATCH 5/6] Use Xcode 12.4 --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37bea062d..9d43f41b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,8 @@ jobs: spm-build-test: runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer steps: - uses: actions/checkout@v2 - name: Remove AppAuth.xcodeproj From 2821262d07018a56c6eb541c009b89a5fe71d440 Mon Sep 17 00:00:00 2001 From: Peter Andrews Date: Fri, 18 Mar 2022 09:40:01 -0700 Subject: [PATCH 6/6] Add GCC flags. --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d43f41b6..eeeb920f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,8 @@ jobs: -scheme AppAuth-Package \ -sdk 'iphonesimulator' \ -destination 'platform=iOS Simulator,name=iPhone 11' \ - -enableCodeCoverage YES + -enableCodeCoverage YES \ + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \ + GCC_GENERATE_TEST_COVERAGE_FILES=YES - name: Upload coverage to Codecov uses: codecov/codecov-action@v2