Skip to content

Commit f7e78d9

Browse files
authored
Codecov is back (#1390)
1 parent df6cee0 commit f7e78d9

5 files changed

Lines changed: 43 additions & 10 deletions

File tree

.circleci/config.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,20 @@ commands:
5757
- run:
5858
name: Check Java code style
5959
command: make checkstyle
60-
- run:
61-
name: Jacoco test report
62-
command: ./gradlew jacocoTestReport
6360
- run:
6461
name: Run unit-test for all modules
6562
command: make test
63+
- run:
64+
name: Jacoco test report
65+
command: ./gradlew jacocoTestReport
6666
- store_artifacts:
6767
path: mapbox/app/build/reports
6868
destination: reports
6969
- store_test_results:
7070
path: mapbox/app/build/test-results
71-
# Disabling Codecov (for now) due to https://about.codecov.io/security-update/
72-
# - run:
73-
# name: Post code coverage report to Codecov.io
74-
# command: |
75-
# bash <(curl -s https://codecov.io/bash)
71+
- run:
72+
name: Post code coverage report to Codecov.io
73+
command: sh scripts/coverage.sh
7674

7775
setup-aws-credentials:
7876
steps:

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
codecov:
2+
require_ci_to_pass: false
3+
notify:
4+
wait_for_ci: false
5+
threshold': 1%
6+
7+
comment:
8+
layout: "reach, diff, flags, files"
9+
behavior: default
10+
require_changes: false
11+
require_base: no
12+
require_head: yes

gradle/dependencies.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ext {
2121
buildConfig: '1.1.8',
2222
dependencyGraph: '0.4.0',
2323
bintray : '1.8.4',
24-
jacoco : '0.8.6',
24+
jacoco : '0.8.7',
2525
maven : '3.6.2',
2626
artifactory: '4.9.3',
2727
kotlin : '1.3.72',

gradle/jacoco.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ test {
1111
}
1212

1313
jacocoTestReport{
14-
dependsOn test
1514
group = 'Coverage reports'
1615
description = 'Generates a test coverage report for a project'
1716

scripts/coverage.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -eoux
3+
# control sum of the key is const: echo | shasum -a 256 pgp_keys.asc
4+
shaSumAscKey="d56942c32a1bb70af75bf972302b6114049fb59cb76193fac349bb9b587b60c2"
5+
6+
curl https://keybase.io/codecovsecurity/pgp_keys.asc -o pgp_keys.asc
7+
# check sum
8+
echo "$shaSumAscKey pgp_keys.asc" | shasum -a 256 -c
9+
10+
gpg --no-default-keyring --keyring trustedkeys.gpg --import pgp_keys.asc
11+
12+
curl -Os https://uploader.codecov.io/latest/linux/codecov
13+
14+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
15+
16+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
17+
18+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
19+
20+
# check sum
21+
shasum -a 256 -c codecov.SHA256SUM
22+
23+
chmod +x codecov
24+
./codecov

0 commit comments

Comments
 (0)