mirror of
https://github.com/penpot/penpot.git
synced 2026-11-19 08:30:42 +00:00
Measure the coverage of the backend, common, frontend and render-wasm test suites in CI, and show it on the workflow run pages and in one "Coverage Report" comment on each pull request. - Backend and common run kaocha with the cloverage plugin through a new `:coverage` alias, which writes lcov, HTML and an EMMA report. The PR report shows lines and Clojure forms (as statements); cloverage measures no functions or branches. Plain local runs are unchanged. - Frontend runs the compiled test bundle with V8 coverage (`pnpm run test:coverage`, `frontend/scripts/coverage.js`) and maps it back to the ClojureScript sources through the source maps of the test build. UI namespaces (`app/main/ui`) are left out. - Render-wasm runs its native Rust tests under cargo-llvm-cov when `RENDER_WASM_COVERAGE` is set. The devenv image lacks the tool, so the workflow downloads a pinned release and checks its sha256. - `scripts/coverage-summary.mjs` renders an lcov file as a markdown table by source area for `$GITHUB_STEP_SUMMARY`; each workflow also uploads the HTML report as an artifact. - `scripts/coverage-comment.mjs` keeps a single PR comment, laid out like the Vitest Coverage Report Action, with a section per project and the coverage of the changed files. Each job updates its own section; the data of every project lives in a hidden block of the comment, and a job writes again when a concurrent one dropped its data. - Lines have targets that only colour the report: 70% backend and common, 50% frontend, 40% render-wasm. - The comment step only runs for PRs from branches of this repo: fork PRs get a read-only token and keep the summary on the run page. AI-assisted-by: claude-opus-5-5
117 lines
3.9 KiB
Clojure
117 lines
3.9 KiB
Clojure
{:mvn/repos
|
|
{"sonatype" {:url "https://oss.sonatype.org/content/repositories/snapshots/"}}
|
|
|
|
:deps
|
|
{penpot/common {:local/root "../common"}
|
|
org.clojure/clojure {:mvn/version "1.12.6"}
|
|
org.clojure/tools.namespace {:mvn/version "1.5.1"}
|
|
|
|
com.github.luben/zstd-jni {:mvn/version "1.5.7-21"}
|
|
|
|
io.prometheus/simpleclient {:mvn/version "0.16.0"}
|
|
io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"}
|
|
io.prometheus/simpleclient_jetty
|
|
{:mvn/version "0.16.0"
|
|
:exclusions [org.eclipse.jetty/jetty-server
|
|
org.eclipse.jetty/jetty-servlet]}
|
|
|
|
io.prometheus/simpleclient_httpserver {:mvn/version "0.16.0"}
|
|
|
|
io.lettuce/lettuce-core {:mvn/version "7.8.0.RELEASE"}
|
|
;; Minimal dependencies required by lettuce, we need to include them
|
|
;; explicitly because clojure dependency management does not support
|
|
;; yet the BOM format.
|
|
io.micrometer/micrometer-core {:mvn/version "1.14.2"}
|
|
io.micrometer/micrometer-observation {:mvn/version "1.14.2"}
|
|
|
|
java-http-clj/java-http-clj {:mvn/version "0.4.3"}
|
|
com.google.guava/guava {:mvn/version "33.7.1-jre"}
|
|
|
|
funcool/yetti
|
|
{:git/tag "v11.11"
|
|
:git/sha "e810f87"
|
|
:git/url "https://github.com/funcool/yetti.git"
|
|
:exclusions [org.slf4j/slf4j-api]}
|
|
|
|
com.github.seancorfield/next.jdbc
|
|
{:mvn/version "1.3.1118"}
|
|
|
|
metosin/reitit-core {:mvn/version "0.11.0"}
|
|
nrepl/nrepl {:mvn/version "1.8.0"}
|
|
|
|
org.postgresql/postgresql {:mvn/version "42.7.13"}
|
|
|
|
com.zaxxer/HikariCP {:mvn/version "7.1.0"}
|
|
|
|
io.whitfin/siphash {:mvn/version "3.0.0"}
|
|
|
|
buddy/buddy-hashers {:mvn/version "2.0.167"}
|
|
buddy/buddy-sign {:mvn/version "3.6.1-359"}
|
|
org.passay/passay {:mvn/version "2.0.0"}
|
|
|
|
com.github.ben-manes.caffeine/caffeine {:mvn/version "3.3.0"}
|
|
|
|
org.jsoup/jsoup {:mvn/version "1.23.2"}
|
|
|
|
at.yawk.lz4/lz4-java
|
|
{:mvn/version "1.12.0"}
|
|
|
|
org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"}
|
|
|
|
dawran6/emoji {:mvn/version "0.2.0"}
|
|
markdown-clj/markdown-clj {:mvn/version "1.12.10"}
|
|
|
|
;; Pretty Print specs
|
|
pretty-spec/pretty-spec {:mvn/version "0.1.4"}
|
|
software.amazon.awssdk/s3 {:mvn/version "2.55.11"}
|
|
software.amazon.awssdk/sts {:mvn/version "2.55.11"}
|
|
|
|
com.ladybugdb/lbug {:mvn/version "0.21.2"}
|
|
;; Required by Arrow RootAllocator (lbug only pulls arrow-memory-core).
|
|
org.apache.arrow/arrow-memory-netty {:mvn/version "19.0.0"}}
|
|
|
|
:paths ["src" "resources" "target/classes"]
|
|
:aliases
|
|
{:dev
|
|
{:jvm-opts ["--sun-misc-unsafe-memory-access=allow"
|
|
"--enable-native-access=ALL-UNNAMED"
|
|
;; Arrow jars are on the classpath (unnamed module), not module-path.
|
|
"--add-opens=java.base/java.nio=ALL-UNNAMED"]
|
|
:extra-deps
|
|
{com.bhauman/rebel-readline {:mvn/version "0.1.11"}
|
|
clojure-humanize/clojure-humanize {:mvn/version "0.2.2"}
|
|
org.clojure/data.csv {:mvn/version "1.1.1"}
|
|
com.clojure-goes-fast/clj-async-profiler {:mvn/version "2.0.0-beta1"}
|
|
mockery/mockery {:mvn/version "0.1.4"}}
|
|
:extra-paths ["test" "dev"]}
|
|
|
|
:build
|
|
{:extra-deps
|
|
{io.github.clojure/tools.build {:mvn/version "0.10.14"}}
|
|
:ns-default build}
|
|
|
|
:test
|
|
{:main-opts ["-m" "kaocha.runner"]
|
|
:jvm-opts ["-Dlog4j2.configurationFile=log4j2-devenv-repl.xml"]
|
|
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}}
|
|
|
|
;; Use after :test (`-M:dev:test:coverage`) to run the suite with cloverage.
|
|
:coverage
|
|
{:main-opts ["-m" "kaocha.runner" "--plugin" "cloverage"]
|
|
:extra-deps {lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}}}
|
|
|
|
:outdated
|
|
{:extra-deps {com.github.liquidz/antq {:mvn/version "2.11.1276"}}
|
|
:main-opts ["-m" "antq.core"]}
|
|
|
|
:jmx-remote
|
|
{:jvm-opts ["-Dcom.sun.management.jmxremote"
|
|
"-Dcom.sun.management.jmxremote.port=9000"
|
|
"-Dcom.sun.management.jmxremote.rmi.port=9000"
|
|
"-Dcom.sun.management.jmxremote.local.only=false"
|
|
"-Dcom.sun.management.jmxremote.authenticate=false"
|
|
"-Dcom.sun.management.jmxremote.ssl=false"
|
|
"-Djava.rmi.server.hostname=localhost"]}
|
|
|
|
}}
|