From 5550fdc0d3ad084f8d4586f7fa4bc06a37b96c2e Mon Sep 17 00:00:00 2001 From: Levi Eggert Date: Thu, 20 Jun 2024 16:02:07 -0400 Subject: [PATCH 1/3] Add swift build --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 355cf76..bd6cc03 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,6 +25,9 @@ jobs: uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '15.4.0' + - name: Build Swift + run: | + swift build - name: Run Tests run: | swift test --enable-code-coverage From 56731982cd1ac26b92748e146339838990a573d3 Mon Sep 17 00:00:00 2001 From: Levi Eggert Date: Thu, 20 Jun 2024 16:37:33 -0400 Subject: [PATCH 2/3] Try bash --- .github/workflows/run-tests.yml | 42 ++++++++++----------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bd6cc03..d32f283 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -35,35 +35,19 @@ jobs: run: | xcrun llvm-cov export -format="lcov" .build/arm64-apple-macosx/debug/LocalizationServicesPackageTests.xctest/Contents/MacOS/LocalizationServicesPackageTests -instr-profile .build/arm64-apple-macosx/debug/codecov/default.profdata > info.lcov - name: Upload Code Coverage Report to CodeCov - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: true - files: info.lcov - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - # - name: Run Tests and Upload Code Coverage - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - # run: | - # swift build - # swift test --enable-code-coverage - # llvm-cov export -format="lcov" .build/debug/LocalizationServicesPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov - # bash <(curl https://codecov.io/bash) -t $CODECOV_TOKEN - - - - # - name: Upload Code Coverage - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - # run: | - # xcrun llvm-cov export -format="lcov" .build/debug/LocalizationServicesPackageTests.xctest/Contents/MacOS/LocalizationServicesPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov - # bash <(curl https://codecov.io/bash) -t $CODECOV_TOKEN - - - - - + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: | + bash <(curl https://codecov.io/bash) -t $CODECOV_TOKEN + # - name: Upload Code Coverage Report to CodeCov + # uses: codecov/codecov-action@v4 + # with: + # fail_ci_if_error: true + # files: info.lcov + # token: ${{ secrets.CODECOV_TOKEN }} + # verbose: true + + # swift build # swift test --enable-code-coverage # llvm-cov export -format="lcov" .build/debug/SwiftLoggerPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov From f21b555db4b30b3dc82c81904e31961e5fa611dc Mon Sep 17 00:00:00 2001 From: Levi Eggert Date: Thu, 20 Jun 2024 16:42:39 -0400 Subject: [PATCH 3/3] Add fetch depth --- .github/workflows/run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d32f283..4dae456 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,7 +20,9 @@ jobs: runs-on: macos-14 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Select Xcode Version uses: maxim-lobanov/setup-xcode@v1 with: