Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swift build #24

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 19 additions & 30 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,36 @@ 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:
xcode-version: '15.4.0'
- name: Build Swift
run: |
swift build
- name: Run Tests
run: |
swift test --enable-code-coverage
- name: Convert To LLVM-COV
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
Expand Down