This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-12
Channels
- # announcements (2)
- # babashka (26)
- # beginners (48)
- # calva (32)
- # cider (23)
- # clj-kondo (61)
- # cljfx (3)
- # clojure (93)
- # clojure-australia (2)
- # clojure-europe (23)
- # clojure-losangeles (1)
- # clojure-nl (5)
- # clojure-uk (4)
- # clojurescript (46)
- # cloverage (9)
- # code-reviews (1)
- # copenhagen-clojurians (1)
- # cursive (39)
- # data-science (6)
- # datahike (8)
- # deps-new (8)
- # depstar (2)
- # etaoin (1)
- # fulcro (2)
- # funcool (2)
- # graalvm (5)
- # jackdaw (3)
- # java (17)
- # jobs-discuss (43)
- # kaocha (2)
- # leiningen (25)
- # malli (8)
- # minecraft (1)
- # missionary (8)
- # observability (6)
- # off-topic (37)
- # other-languages (12)
- # practicalli (1)
- # reagent (4)
- # releases (78)
- # remote-jobs (1)
- # sci (9)
- # shadow-cljs (13)
- # spacemacs (6)
- # sql (1)
- # tools-deps (30)
- # xtdb (3)
Sorry @lee late response, I want to change the messag in Clojure CI / cloverage (pull_request) Successful in 4m
to Clojure CI / cloverage (pull_request) Testing coverage is 80%
, do you think is that possible?
@fabrao Oh I see. You want to see a summary of % coverage without digging into the workflow output. http://Codecov.io kinda sorta does this. I personally did not like this behaviour and disabled it, but by default it will add a comment to your PR. Here's https://github.com/lambdaisland/kaocha/pull/265#issuecomment-1010305140.
Ho, that´s nice, but I want something more simple, just a message. But I think it´s more like github
integration stuff, thank you
Yeah, I hear ya, might be possible, but I also would not be surprised if GitHub would want to keep that top-level summary message standard/fixed. Let us know if you find a way!
I could use in other way, but could not in the same line as the checking, that I want to do. But it solve the issue in anyway.
the project is private but I can share the way we did it for github
action:
# Run tests
- name: Run Coverage Tests
run: clojure -M:cloverage > /tmp/cloverage.txt
- name: Generate covarege Status
run: |
set -x
total=`cat /tmp/cloverage.txt | grep "ALL FILES" | grep -Eo '[0-9]+\.[0-9]+' | head -1`
echo "total coverage: $total"
curl "https://${{ github.actor }}:${{ github.token }}@api.github.com/repos/${COMPANY}/${PROJECT}/statuses/${COMMIT_SHA}" -d "{\"state\": \"success\",\"target_url\": \"\",\"description\": \"${total}%\",\"context\": \"Resultado cobertura dos testes\"}"
env:
COMPANY: "company_name"
PROJECT: "project_name"
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
RUN_ID: ${{ github.run_id }}
deps.edn::cloverage
{:extra-paths ["test"]
:extra-deps {cloverage/cloverage {:mvn/version "1.2.2"}
babashka/process {:mvn/version "0.0.2"}
spec-provider/spec-provider {:mvn/version "0.4.14"}}
:main-opts ["-m" "cloverage.coverage"
"--no-html"
"-p" "src"
"-s" "test"
"--no-colorize"
"-t" "^(?!.*?(?:live|integration)).*$"
"--fail-threshold" "30"]}