Skip to content

Commit

Permalink
Merge pull request #3 from sushichop/PR/reflect-test
Browse files Browse the repository at this point in the history
Reflect the test results
  • Loading branch information
sushichop authored Oct 19, 2020
2 parents 78d281a + a657854 commit e5146ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v2
- run: |
swift --version
make swift-test
swift test --enable-test-discovery
swift-test-linux:
name: swift-test-linux - Swift ${{ matrix.swift-version }}
Expand All @@ -65,7 +65,9 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v2
- run: make swift-test-linux SWIFT_VERSION=${{ matrix.swift-version }}
- run: |
swift --version
docker run --rm --volume "${PWD}:/src" --workdir "/src" swift:${{ matrix.swift-version }} swift test --enable-test-discovery
codecov:
name: codecov - Xcode ${{ matrix.xcode }}
Expand All @@ -83,8 +85,7 @@ jobs:
swift --version
make export-codecov
- name: codecov
if: success()
uses: codecov/codecov-action@v1
with:
file: info.lcov
file: coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ DerivedData/
/*.gcno

# Codecov
info.lcov
coverage.lcov

# Bundler
/.bundle
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

- Written in Swift.
- Supports console, file, syslog, and oslog as loggers.
- Support automatic log roration about file logger.
- Supports automatic log roration about file logger.
- Supports both Darwin and Linux.
- Supports apple/swift-log.

## Examples

**Logging to console and file and use file log rotation feature.**
**Logging to console and file using file log rotation feature.**

You can basically use CocoaPods, Carthage, and Swift Package Manager for integration.

Expand Down
6 changes: 3 additions & 3 deletions scripts/llvm-cov-export.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

echo "Deleting info.lcov..."
rm -f info.lcov
echo "Deleting coverage.lcov..."
rm -f coverage.lcov

swift test --enable-test-discovery --enable-code-coverage

Expand All @@ -24,4 +24,4 @@ esac
$LLVM_COV export -format="lcov" "${COV_BIN}" \
-instr-profile=.build/debug/codecov/default.profdata \
-ignore-filename-regex=".build|Tests" \
> info.lcov
> coverage.lcov

0 comments on commit e5146ff

Please sign in to comment.