Skip to content

Commit

Permalink
merging from FelinePineLogging (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion authored Oct 22, 2024
1 parent ab8e5a7 commit c318685
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions .github/workflows/FelinePine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,18 @@ jobs:
run: swift build
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage
- name: Prepare Code Coverage
run: llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/${{ env.PACKAGE_NAME }}PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F spm -F ${RELEASE_NAME} -F ${SWIFT_VER}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
flags: swift-${{ matrix.swift-version }},ubuntu
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
build-macos:
name: Build on macOS
env:
Expand Down Expand Up @@ -140,10 +146,15 @@ jobs:
- name: Run Swift Package tests
run: swift test -v --enable-code-coverage
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload SPM to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F spm -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
id: coverage-files-spm
with:
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ${{ join(fromJSON(steps.coverage-files-spm.outputs.files), ',') }}
token: ${{ secrets.CODECOV_TOKEN }}
flags: macOS,${{ env.XCODE_NAME }},${{ matrix.runs-on }}
- name: Clean up spm build directory
run: rm -rf .build
- name: Lint
Expand All @@ -152,15 +163,28 @@ jobs:
- name: Run iOS target tests
run: xcodebuild test -scheme FelinePine -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload iOS Coverage to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F iOS -F iOS${{ matrix.iOSVersion }} -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
id: coverage-files-iOS
with:
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme FelinePine -sdk watchsimulator -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload watchOS Coverage to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F watchOS -F watchOS${{ matrix.watchOSVersion }} -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
id: coverage-files-watchOS
with:
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files-watchOS.outputs.files), ',') }}
flags: watchOS,watchOS${{ matrix.watchOSVersion }},macOS,${{ env.XCODE_NAME }}

0 comments on commit c318685

Please sign in to comment.