Skip to content

Commit 4146ca2

Browse files
committed
CI cleanup
- test on 1.1 - remove coveralls badge - use project setup for coverage
1 parent 0b315b7 commit 4146ca2

6 files changed

Lines changed: 29 additions & 12 deletions

File tree

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ os:
55
# - osx
66
julia:
77
- 1.0
8+
- 1.1
89
- nightly
910
notifications:
1011
email: false
@@ -13,17 +14,15 @@ git:
1314
## uncomment the following lines to allow failures on nightly julia
1415
## (tests will run but not make your overall status red)
1516
matrix:
16-
allow_failures:
17-
- julia: nightly
17+
allow_failures:
18+
- julia: nightly
1819
## uncomment and modify the following lines to manually install system packages
1920
#addons:
2021
# apt: # apt-get for linux
2122
# packages:
2223
# - gfortran
2324
#before_script: # homebrew for mac
2425
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi
25-
after_success:
26-
- julia submit_coverage.jl # submit coverage
2726
jobs:
2827
include:
2928
- stage: "Documentation"
@@ -33,3 +32,6 @@ jobs:
3332
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))'
3433
- julia --project=docs/ docs/make.jl
3534
after_success: skip
35+
after_success:
36+
- julia --project=test/coverage -e 'using Pkg; Pkg.instantiate()'
37+
- julia --project=test/coverage test/coverage/coverage.jl

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
![Lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)
44
[![Build Status](https://travis-ci.org/tpapp/LogDensityProblems.jl.svg?branch=master)](https://travis-ci.org/tpapp/LogDensityProblems.jl)
5-
[![Coverage Status](https://coveralls.io/repos/tpapp/LogDensityProblems.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/tpapp/LogDensityProblems.jl?branch=master)
65
[![codecov.io](http://codecov.io/github/tpapp/LogDensityProblems.jl/coverage.svg?branch=master)](http://codecov.io/github/tpapp/LogDensityProblems.jl?branch=master)
76
[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://tpapp.github.io/LogDensityProblems.jl/dev)
87

submit_coverage.jl

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/coverage/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"

test/coverage/coverage-summary.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
####
2+
#### Coverage summary, printed as "(percentage) covered".
3+
####
4+
#### Useful for CI environments that just want a summary (eg a Gitlab setup).
5+
####
6+
7+
using Coverage
8+
cd(joinpath(@__DIR__, "..", "..")) do
9+
covered_lines, total_lines = get_summary(process_folder())
10+
percentage = covered_lines / total_lines * 100
11+
println("($(percentage)%) covered")
12+
end

test/coverage/coverage.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# only push coverage from one bot
2+
get(ENV, "TRAVIS_OS_NAME", nothing) == "linux" || exit(0)
3+
get(ENV, "TRAVIS_JULIA_VERSION", nothing) == "1.0" || exit(0)
4+
5+
using Coverage
6+
7+
cd(joinpath(@__DIR__, "..", "..")) do
8+
Codecov.submit(Codecov.process_folder())
9+
end

0 commit comments

Comments
 (0)