Skip to content

Commit

Permalink
Add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
loicknuchel committed Oct 30, 2020
1 parent 059fe3f commit 5e8a117
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
23 changes: 15 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,35 @@ stages:
jobs:
include:
# stage="test" if no stage is specified
- name: test jdk11 2.13
scala: [2.13.3]
- name: test 2.13 & jdk11
scala: [ 2.13.3 ]
jdk: openjdk11
script: sbt ++$TRAVIS_SCALA_VERSION test
- name: test jdk8 2.13
scala: [2.13.3]
- name: test 2.13 & jdk8
scala: [ 2.13.3 ]
jdk: openjdk8
script: sbt ++$TRAVIS_SCALA_VERSION test
- name: test jdk11 2.12
scala: [2.12.12]
- name: test 2.12 & jdk11
scala: [ 2.12.12 ]
jdk: openjdk11
script: sbt ++$TRAVIS_SCALA_VERSION test
- name: test jdk8 2.12
scala: [2.12.12]
- name: test 2.12 & jdk8
scala: [ 2.12.12 ]
jdk: openjdk8
script: sbt ++$TRAVIS_SCALA_VERSION test
- name: coverage
scala: [ 2.13.3 ]
jdk: openjdk11
script: sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport
# run ci-release only if previous stages passed
- stage: release
name: release
jdk: openjdk8
script: sbt ci-release

after_success:
- bash <(curl -s https://codecov.io/bash)

cache:
directories:
- $HOME/.ivy2/cache
Expand Down
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# SafeQL [![travis-badge][]][travis] [![release-badge][]][release] [![maven-badge][]][maven]

[travis]: https://travis-ci.com/loicknuchel/SafeQL
[travis-badge]: https://travis-ci.com/loicknuchel/SafeQL.svg?branch=master
[release]: https://github.com/loicknuchel/SafeQL/releases/latest
[release-badge]: https://img.shields.io/github/release/loicknuchel/SafeQL.svg
[maven]: https://maven-badges.herokuapp.com/maven-central/loicknuchel/SafeQL_2.13
[maven-badge]: https://maven-badges.herokuapp.com/maven-central/loicknuchel/SafeQL_2.13/badge.svg
# SafeQL [![travis-badge][]][travis] [![codecov-badge][]][codecov] [![release-badge][]][release] [![maven-badge][]][maven] [![license-badge][]][license]

[travis]: https://travis-ci.com/loicknuchel/SafeQL
[travis-badge]: https://travis-ci.com/loicknuchel/SafeQL.svg?branch=master
[codecov]: http://codecov.io/github/loicknuchel/SafeQL?branch=master
[codecov-badge]: http://codecov.io/github/loicknuchel/SafeQL/coverage.svg?branch=master
[release]: https://github.com/loicknuchel/SafeQL/releases/latest
[release-badge]: https://img.shields.io/github/release/loicknuchel/SafeQL.svg
[maven]: https://search.maven.org/artifact/fr.loicknuchel/safeql_2.13
[maven-badge]: https://img.shields.io/maven-central/v/fr.loicknuchel/safeql_2.13
[license]: https://github.com/loicknuchel/SafeQL/blob/master/LICENSE
[license-badge]: https://img.shields.io/github/license/loicknuchel/SafeQL

A Scala DSL to build typesafe SQL queries on top of Doobie.

Expand Down Expand Up @@ -44,3 +48,10 @@ val user: Option[User] = USERS.select.where(_.ID is User.Id(1)).option[User].run
val users: List[User] = USERS.select.all[User].run(xa).unsafeRunSync()
val postsWithUsers: List[(Post, User)] = POSTS.joinOn(_.AUTHOR).select.all[(Post, User)].run(xa).unsafeRunSync()
```

## Development

## Releasing

Every commit on master is [released as SNAPSHOT](https://oss.sonatype.org/#nexus-search;quick~fr.loicknuchel) so you can use it immediately thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release) plugin.
To push a stable release, push a tag version starting with 'v' (ex: `v0.1.0`).
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") // publish to maven central using sonatype nexus
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

0 comments on commit 5e8a117

Please sign in to comment.