From 88dc38de8ff7abf2a27067afaff05a963259dc38 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 13:50:49 +0200 Subject: [PATCH 1/9] added .codecov.yaml --- .codecov.yml | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..e5086996a --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,163 @@ +codecov: + #token: uuid # Your private repository token + #url: "http" # for Codecov Enterprise customers + #slug: "owner/repo" # for Codecov Enterprise customers + branch: master # override the default branch + #bot: username # set user whom will be the consumer of oauth requests + #ci: # Custom CI domains if Codecov does not identify them automatically + # - ci.domain.com + # - !provider # ignore these providers when checking if CI passed + # # ex. You may test on Travis, Circle, and AppVeyor, but only need + # # to check if Travis passes. Therefore add: !circle and !appveyor + notify: + after_n_builds: null # number of expected builds to recieve before sending notifications + # after: check ci status unless disabled via require_ci_to_pass + require_ci_to_pass: yes # yes: will delay sending notifications until all ci is finished + # no: will send notifications without checking ci status and wait till "after_n_builds" are uploaded + countdown: null # number of seconds to wait before first ci build check + delay: null # number of seconds to wait between ci build checks + +coverage: + precision: 2 # 2 = xx.xx%, 0 = xx% + round: nearest # down|up|nearest - default down + # range: 50...60 # default 70...90. red...green + + #notify: + # irc: + # default: + # server: "chat.freenode.net"|encrypted + # branches: null # all branches by default + # threshold: 1% + # message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message + # flags: null + # paths: null + # + # slack: + # default: + # url: "http"|encrypted + # threshold: 1% + # branches: null # all branches by default + # message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message + # attachments: "sunburst, diff" + # only_pulls: false + # flags: null + # paths: null + # + # email: + # default: + # to: + # - example@domain.com + # - &author + # threshold: 1% + # only_pulls: false + # layout: header, diff, trends + # flags: null + # paths: null + # + # hipchat: + # default: + # url: "http"|encrypted + # room: name|id + # threshold: 1% + # token: encrypted + # branches: null # all branches by default + # notify: false # if the hipchat message is silent or loud (default false) + # message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message + # flags: null + # paths: null + # + # gitter: + # url: "http"|encrypted + # threshold: 1% + # branches: null # all branches by default + # message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message + # + # webhooks: + # _name_: + # url: "http"|encrypted + # threshold: 1% + # branches: null # all branches by default + + status: + project: + default: false # disable the default status that measures entire project + backend: # declare a new status context "backend" + against: parent + target: auto + threshold: null + #threshold: 1% + base: auto + if_no_uploads: error + if_not_found: success + if_ci_failed: error + only_pulls: false + #branches: + # - master + #flags: + # - integration + paths: + - backend/ # only include coverage in "backend/" folder + webapp: # declare a new status context "frontend" + against: parent + target: auto + threshold: null + #threshold: 1% + base: auto + if_no_uploads: error + if_not_found: success + if_ci_failed: error + only_pulls: false + #branches: + # - master + #flags: + # - integration + paths: + - webapp/ # only include coverage in "webapp/" folder + + #patch: + # default: + # against: parent + # target: 80% + # branches: null + # if_no_uploads: success + # if_not_found: success + # if_ci_failed: error + # only_pulls: false + # flags: + # - integration + # paths: + # - folder + + #changes: + # default: + # against: parent + # branches: null + # if_no_uploads: error + # if_not_found: success + # if_ci_failed: error + # only_pulls: false + # flags: + # - integration + # paths: + # - folder + + #flags: + # integration: + # branches: + # - master + # ignore: + # - app/ui + + #ignore: # files and folders for processing + # - tests/* + + #fixes: + # - "old_path::new_path" + +comment: + layout: header, diff, trends, uncovered + branches: * + behavior: default # default = posts once then update, posts new if delete + # once = post once then updates + # new = delete old, post new + # spammy = post new \ No newline at end of file From e2d2236c1a4777a6a81b82ed270ddba5ea7fd072 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 14:08:20 +0200 Subject: [PATCH 2/9] add volumes to docker-compose.travis.yml, modified .travis.yml for codecov upload --- .travis.yml | 7 +++++++ docker-compose.travis.yml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 632786285..4d9a4c733 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ addons: before_install: - yarn global add wait-on + # Install Codecov + - yarn global add codecov - yarn install - cp cypress.env.template.json cypress.env.json @@ -18,6 +20,7 @@ install: - wait-on http://localhost:7474 && docker-compose exec neo4j migrate script: + # Backend - docker-compose exec backend yarn run lint - docker-compose exec backend yarn run test:jest --ci --verbose=false - docker-compose exec backend yarn run db:reset @@ -25,10 +28,14 @@ script: - docker-compose exec backend yarn run test:cucumber - docker-compose exec backend yarn run db:reset - docker-compose exec backend yarn run db:seed + # Frontend - docker-compose exec webapp yarn run lint - docker-compose exec webapp yarn run test --ci --verbose=false - docker-compose exec -d backend yarn run test:before:seeder + # Fullstack - CYPRESS_RETRIES=1 yarn run cypress:run + # Coverage + - codecov after_success: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index 8af3226e7..a677d7b46 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -11,6 +11,8 @@ services: build: context: webapp target: build-and-test + volumes: + - coverage:webapp/coverage environment: - GRAPHQL_URI=http://backend:4000 backend: @@ -18,6 +20,8 @@ services: build: context: backend target: builder + volumes: + - coverage:backend/coverage ports: - 4001:4001 - 4123:4123 From 7d215739bb8df2072410b99d46d76b17c855b058 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 14:14:21 +0200 Subject: [PATCH 3/9] corrected docker volumes paths --- docker-compose.travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index a677d7b46..81828daa1 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -12,7 +12,7 @@ services: context: webapp target: build-and-test volumes: - - coverage:webapp/coverage + - ./coverage:./webapp/coverage environment: - GRAPHQL_URI=http://backend:4000 backend: @@ -21,7 +21,7 @@ services: context: backend target: builder volumes: - - coverage:backend/coverage + - ./coverage:./backend/coverage ports: - 4001:4001 - 4123:4123 From 3545f1240e960092c20e9c1c5e7646faa3e8892d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 14:30:21 +0200 Subject: [PATCH 4/9] another try with relative paths --- docker-compose.travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index 81828daa1..7553bb939 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -12,7 +12,8 @@ services: context: webapp target: build-and-test volumes: - - ./coverage:./webapp/coverage + #/nitro-web + - ./webapp/coverage:./coverage environment: - GRAPHQL_URI=http://backend:4000 backend: @@ -21,7 +22,7 @@ services: context: backend target: builder volumes: - - ./coverage:./backend/coverage + - ./backend/coverage:./coverage ports: - 4001:4001 - 4123:4123 From ddb33da045e4f9f8f4d9d3e4a0524ada3d8abe8d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 14:42:25 +0200 Subject: [PATCH 5/9] absolute paths --- docker-compose.travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index 7553bb939..bc627a67a 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -13,7 +13,7 @@ services: target: build-and-test volumes: #/nitro-web - - ./webapp/coverage:./coverage + - ./webapp/coverage:/nitro-web/coverage environment: - GRAPHQL_URI=http://backend:4000 backend: @@ -22,7 +22,7 @@ services: context: backend target: builder volumes: - - ./backend/coverage:./coverage + - ./backend/coverage:/nitro-backend/coverage ports: - 4001:4001 - 4123:4123 From 6aa4426c420a24ca2d585aecd9f6cf4b019f77d2 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 15:46:19 +0200 Subject: [PATCH 6/9] adjusted .codecov.yml a bit - hopefully we get better results --- .codecov.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index e5086996a..1c8366328 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -2,7 +2,7 @@ codecov: #token: uuid # Your private repository token #url: "http" # for Codecov Enterprise customers #slug: "owner/repo" # for Codecov Enterprise customers - branch: master # override the default branch + #branch: master # override the default branch #bot: username # set user whom will be the consumer of oauth requests #ci: # Custom CI domains if Codecov does not identify them automatically # - ci.domain.com @@ -10,12 +10,12 @@ codecov: # # ex. You may test on Travis, Circle, and AppVeyor, but only need # # to check if Travis passes. Therefore add: !circle and !appveyor notify: - after_n_builds: null # number of expected builds to recieve before sending notifications - # after: check ci status unless disabled via require_ci_to_pass + #after_n_builds: null # number of expected builds to recieve before sending notifications + # # after: check ci status unless disabled via require_ci_to_pass require_ci_to_pass: yes # yes: will delay sending notifications until all ci is finished # no: will send notifications without checking ci status and wait till "after_n_builds" are uploaded - countdown: null # number of seconds to wait before first ci build check - delay: null # number of seconds to wait between ci build checks + #countdown: null # number of seconds to wait before first ci build check + #delay: null # number of seconds to wait between ci build checks coverage: precision: 2 # 2 = xx.xx%, 0 = xx% From dc2f3642713c6751a727996a2244601e779a6e33 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 15:54:18 +0200 Subject: [PATCH 7/9] always post new coverage data, this way it will be always at the bottom --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 1c8366328..17e7cc2ce 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -157,7 +157,7 @@ coverage: comment: layout: header, diff, trends, uncovered branches: * - behavior: default # default = posts once then update, posts new if delete + behavior: new # default = posts once then update, posts new if delete # once = post once then updates # new = delete old, post new # spammy = post new \ No newline at end of file From b92bdc8d294aa6cf33b71751faf5ba321e7c0fcc Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 16:21:45 +0200 Subject: [PATCH 8/9] more comment options --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 17e7cc2ce..827970de1 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -155,7 +155,7 @@ coverage: # - "old_path::new_path" comment: - layout: header, diff, trends, uncovered + layout: header, diff, trends, uncovered, reach, files, tree, changes, sunburst branches: * behavior: new # default = posts once then update, posts new if delete # once = post once then updates From f63ed9d8baac9fb064d2ee17409fa14a009921df Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 8 May 2019 16:27:31 +0200 Subject: [PATCH 9/9] even more options --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 827970de1..acb9a1406 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -155,7 +155,7 @@ coverage: # - "old_path::new_path" comment: - layout: header, diff, trends, uncovered, reach, files, tree, changes, sunburst + layout: header, diff, trends, uncovered, reach, files, tree, changes, sunburst, flags branches: * behavior: new # default = posts once then update, posts new if delete # once = post once then updates