Enable coverage

This commit is contained in:
Christian Treffs 2020-06-26 16:32:29 +02:00
parent 156ec264a2
commit c42dc02b88
No known key found for this signature in database
GPG Key ID: 49A4B4B460BE3ED4
4 changed files with 9 additions and 57 deletions

5
.codecov.yml Normal file
View File

@ -0,0 +1,5 @@
ignore:
- "Tests/"
comment:
layout: header, changes, diff

View File

@ -12,7 +12,9 @@ script:
- swift package reset
- swift build
- swift test --enable-code-coverage
- xcrun llvm-cov show -instr-profile=.build/debug/codecov/default.profdata .build/debug/FirebladeECSPackageTests.xctest/Contents/MacOS/FirebladeECSPackageTests > coverage.txt
after_success:
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
bash <(curl -s https://codecov.io/bash);
bash <(curl -s https://codecov.io/bash) -t cec6c76e-219d-4bc2-aa4e-7161c6320342;
fi

View File

@ -1,56 +0,0 @@
# Version 1.0.0
UNAME_S := $(shell uname -s)
# Lint
lint:
swiftlint autocorrect --format
swiftlint lint --quiet
lintErrorOnly:
@swiftlint autocorrect --format --quiet
@swiftlint lint --quiet | grep error
# Git
precommit: lint genLinuxTests
submodule:
git submodule init
git submodule update --recursive
# Tests
genLinuxTests:
swift test --generate-linuxmain
swiftlint autocorrect --format --path Tests/
test: genLinuxTests
swift test
# Package
latest:
swift package update
resolve:
swift package resolve
# Xcode
genXcode:
swift package generate-xcodeproj --enable-code-coverage --skip-extra-files
genXcodeOpen: genXcode
open *.xcodeproj
# Clean
clean:
swift package reset
rm -rdf .swiftpm/xcode
rm -rdf .build/
rm Package.resolved
rm .DS_Store
cleanArtifacts:
swift package clean
# Test links in README
# requires <https://github.com/tcort/markdown-link-check>
testReadme:
markdown-link-check -p -v ./README.md

View File

@ -4,6 +4,7 @@
[![swift version](https://img.shields.io/badge/swift-5.1+-brightgreen.svg)](https://swift.org/download)
[![platforms](https://img.shields.io/badge/platforms-%20macOS%20|%20iOS%20|%20tvOS%20|%20watchOS-brightgreen.svg)](#)
[![platforms](https://img.shields.io/badge/platforms-linux-brightgreen.svg)](#)
[![codecov](https://codecov.io/gh/fireblade-engine/ecs/branch/master/graph/badge.svg)](https://codecov.io/gh/fireblade-engine/ecs)
This is a **dependency free**, **lightweight**, **fast** and **easy to use** [Entity-Component System](https://en.wikipedia.org/wiki/Entity_component_system) implementation in Swift. It is developed and maintained as part of the [Fireblade Game Engine project](https://github.com/fireblade-engine).