Skip to content

Commit

Permalink
Improve docker image size (#231)
Browse files Browse the repository at this point in the history
* Add Chromium support for macOS

* Load Iosevka font from online storage
  • Loading branch information
svkirillov authored Mar 1, 2024
1 parent dd970c6 commit a686fe7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ RUN <<EOF
tini \
chromium \
font-inter \
font-iosevka-base \
fontconfig

fc-cache -fv
Expand Down
5 changes: 4 additions & 1 deletion internal/report/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ func findChrome() (string, error) {
case "windows":
chromePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
case "darwin":
chromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
chromePath = "/Applications/Chromium.app/Contents/MacOS/Chromium"
if _, err := os.Stat(chromePath); errors.Is(err, os.ErrNotExist) {
chromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
}
case "linux":
var err error
for _, name := range []string{"chromium-browser", "google-chrome-stable"} {
Expand Down
4 changes: 3 additions & 1 deletion pkg/report/report_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8">
<title>GoTestWaf report</title>
<script src="https://go-echarts.github.io/go-echarts-assets/assets/echarts.min.js"></script>
<link href="https://iosevka-webfonts.github.io/iosevka/iosevka.css" rel="stylesheet" />
<style>
/*vars*/
:root {
Expand Down Expand Up @@ -68,7 +69,8 @@
color: var(--black);
}
.mono {
font-family: Iosevka, monospace;
font-family: Iosevka Web, monospace;
font-style: normal;
}
.title {
font-size: 24px;
Expand Down

0 comments on commit a686fe7

Please sign in to comment.