Skip to content

Commit

Permalink
Upload code cov with action
Browse files Browse the repository at this point in the history
  • Loading branch information
levieggertcru committed Jun 20, 2024
1 parent 5ec2ea8 commit bee9e59
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,46 @@ concurrency:
jobs:
run_tests_and_code_coverage:
name: Run Tests and Code Coverage
runs-on: ubuntu-latest
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v3
# - name: Select Xcode Version
# uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: '15.4.0'
- name: Install Swift
uses: sersoft-gmbh/swifty-linux-action@v3
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
release-version: '5.7'
- name: Run Tests and Upload Code Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
xcode-version: '15.4.0'
- name: Run Tests
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: Convert To LLVM-COV
run: |
xcrun llvm-cov export -format="lcov" .build/debug/LocalizationServicesPackageTests.xctest/Contents/MacOS/LocalizationServicesPackageTests -instr-profile .build/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
# - name: Run Tests
# run: |
# swift test --enable-code-coverage
# - name: Upload Xcode Code Coverage Report to CodeCov
# uses: codecov/codecov-action@v4
# with:
# fail_ci_if_error: true
# files: /Users/runner/work/localization-services-ios/localization-services-ios/.build/arm64-apple-macosx/debug/codecov/LocalizationServices.json
# token: ${{ secrets.CODECOV_TOKEN }}
# verbose: true




Expand Down

0 comments on commit bee9e59

Please sign in to comment.