Skip to content

Try bash to upload code cov as lcov format #42

Try bash to upload code cov as lcov format

Try bash to upload code cov as lcov format #42

Workflow file for this run

name: Run Tests
on:
push:
branches: [ develop, main, feature/* ]
pull_request:
branches: [ develop, main, feature/* ]
permissions:
id-token: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run_tests_and_code_coverage:
name: Run Tests and Code Coverage
runs-on: ubuntu-latest
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: Run Tests
run: |
swift test --enable-code-coverage
- name: Upload Code Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
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: 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
# 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
# bash <(curl https://codecov.io/bash)