Skip to content

Commit

Permalink
fix(ci/cd): codecov build err
Browse files Browse the repository at this point in the history
  • Loading branch information
sincerefly committed Jun 27, 2024
1 parent 638262b commit 3a56b2b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
matrix:
go:
- '1.21'
- '1.20'

steps:
- name: Checkout code
Expand Down
23 changes: 23 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
codecov:
require_ci_to_pass: yes
coverage:
status:
patch: no
project:
default:
threshold: 1%
if_not_found: success
changes: no
#What precision do you want the coverage value to be
precision: 2
#The value range where you want the value to be green
range: "50...100"
ignore:
- "test/.*"
- ".github/.*"
- "input/.*"
- "*.md"
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sincerefly/capybara

go 1.20
go 1.21

require (
github.com/alitto/pond v1.9.0
Expand Down
13 changes: 5 additions & 8 deletions tools/exifviewer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/sincerefly/capybara/utils/exif_utils"
"github.com/sincerefly/capybara/service/border/styles_common"
"github.com/sincerefly/capybara/utils/fileitem"
"os"
"path/filepath"
Expand All @@ -24,19 +24,16 @@ func main() {

imgPath := args[0]

// parser exif meta data
etClient, err := exif_utils.NewExifClient()
if err != nil {
fmt.Println(err)
}

filename := filepath.Base(imgPath)
fi := fileitem.NewFileItem(filename)
fi.SetInnerPath(filepath.Dir(imgPath))

store := fileitem.NewFileItemStore()
store.Add(fi)
metas := etClient.GetFilesMetaByStore(&store)
metas, err := styles_common.GetFilesMetaByStore(&store)
if err != nil {
fmt.Println(err)
}

for field, value := range metas[0].PrimitiveMeta().Fields {
fmt.Printf("[%s] %v\n", field, value)
Expand Down

0 comments on commit 3a56b2b

Please sign in to comment.