Skip to content

Commit

Permalink
Merge pull request #303 from k1LoW/mv-pkg
Browse files Browse the repository at this point in the history
mv pkg/* to ./
  • Loading branch information
k1LoW authored Nov 29, 2023
2 parents 99ba6a7 + 665bb0c commit 9e8ee52
Show file tree
Hide file tree
Showing 63 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
with:
go-version-file: go.mod

- name: Run tests pkg/coverage
run: go test ./pkg/coverage/... -coverprofile=coverage_coverage.out -covermode=count
- name: Run tests coverage
run: go test ./coverage/... -coverprofile=coverage_coverage.out -covermode=count

- name: Run tests pkg/ratio
run: go test ./pkg/ratio/... -coverprofile=coverage_ratio.out -covermode=count
- name: Run tests ratio
run: go test ./ratio/... -coverprofile=coverage_ratio.out -covermode=count

- name: Run tests pkg/badge
run: go test ./pkg/badge/... -coverprofile=coverage_badge.out -covermode=count
- name: Run tests badge
run: go test ./badge/... -coverprofile=coverage_badge.out -covermode=count

- uses: actions/upload-artifact@v2
with:
Expand All @@ -54,7 +54,7 @@ jobs:
go-version-file: go.mod

- name: Run tests other
run: go test $(go list ./... | grep -v pkg) -coverprofile=coverage_other.out -covermode=count
run: go test $(go list ./... | grep -v coverage | grep -v ratio | grep -v badge) -coverprofile=coverage_other.out -covermode=count

- uses: actions/upload-artifact@v2
with:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/badge/cmd/badgen/main.go → badge/cmd/badgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ THE SOFTWARE.
*/
package main

import "github.com/k1LoW/octocov/pkg/badge/cmd"
import "github.com/k1LoW/octocov/badge/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion pkg/badge/cmd/root.go → badge/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package cmd
import (
"os"

"github.com/k1LoW/octocov/pkg/badge"
"github.com/k1LoW/octocov/badge"
"github.com/spf13/cobra"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion central/central.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/k1LoW/octocov/datastore/local"
"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/internal"
"github.com/k1LoW/octocov/pkg/badge"
"github.com/k1LoW/octocov/badge"
"github.com/k1LoW/octocov/report"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/badge.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

"github.com/k1LoW/octocov/config"
"github.com/k1LoW/octocov/internal"
"github.com/k1LoW/octocov/pkg/badge"
"github.com/k1LoW/octocov/badge"
"github.com/k1LoW/octocov/report"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"path/filepath"

"github.com/k1LoW/octocov/config"
"github.com/k1LoW/octocov/pkg/pplang"
"github.com/k1LoW/octocov/pplang"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/k1LoW/octocov/datastore"
"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/internal"
"github.com/k1LoW/octocov/pkg/badge"
"github.com/k1LoW/octocov/badge"
"github.com/k1LoW/octocov/report"
"github.com/k1LoW/octocov/version"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"path/filepath"

"github.com/k1LoW/octocov/config"
"github.com/k1LoW/octocov/pkg/coverage"
"github.com/k1LoW/octocov/coverage"
"github.com/k1LoW/octocov/report"
"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/pplang/pplang_test.go → pplang/pplang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestDetect(t *testing.T) {
if err != nil {
t.Fatal(err)
}
dir, err := filepath.Abs(filepath.Dir(filepath.Dir(wd)))
dir, err := filepath.Abs(filepath.Dir(wd))
if err != nil {
t.Fatal(err)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions pkg/ratio/ratio_test.go → ratio/ratio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ func TestPathMatch(t *testing.T) {
if err != nil {
t.Fatal(err)
}
want := "pkg/ratio/ratio_test.go"
want := "ratio/ratio_test.go"
ok := false
for _, f := range got.CodeFiles {
if f.Path == want {
ok = true
}
}
if ok {
t.Error("pkg/ratio/ratio_test.go should not be contained")
t.Error("ratio/ratio_test.go should not be contained")
}
}

Expand All @@ -124,15 +124,15 @@ func TestPathMatch(t *testing.T) {
if err != nil {
t.Fatal(err)
}
want := "pkg/ratio/ratio_test.go"
want := "ratio/ratio_test.go"
ok := false
for _, f := range got.CodeFiles {
if f.Path == want {
ok = true
}
}
if !ok {
t.Error("pkg/ratio/ratio_test.go should be contained")
t.Error("ratio/ratio_test.go should be contained")
}
}
}
Expand Down Expand Up @@ -162,7 +162,7 @@ func testdataDir(t *testing.T) string {
if err != nil {
t.Fatal(err)
}
dir, err := filepath.Abs(filepath.Join(filepath.Dir(filepath.Dir(wd)), "testdata"))
dir, err := filepath.Abs(filepath.Join(filepath.Dir(wd), "testdata"))
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions report/diff_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/pkg/coverage"
"github.com/k1LoW/octocov/pkg/ratio"
"github.com/k1LoW/octocov/coverage"
"github.com/k1LoW/octocov/ratio"
"github.com/olekukonko/tablewriter"
)

Expand Down
4 changes: 2 additions & 2 deletions report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/goccy/go-json"
"github.com/hashicorp/go-multierror"
"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/pkg/coverage"
"github.com/k1LoW/octocov/pkg/ratio"
"github.com/k1LoW/octocov/coverage"
"github.com/k1LoW/octocov/ratio"
"github.com/olekukonko/tablewriter"
"github.com/samber/lo"
)
Expand Down
6 changes: 3 additions & 3 deletions report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/goccy/go-json"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/k1LoW/octocov/coverage"
"github.com/k1LoW/octocov/gh"
"github.com/k1LoW/octocov/pkg/coverage"
"github.com/k1LoW/octocov/pkg/ratio"
"github.com/k1LoW/octocov/ratio"
)

func TestNew(t *testing.T) {
Expand Down Expand Up @@ -530,7 +530,7 @@ func coverageTestdataDir(t *testing.T) string {
if err != nil {
t.Fatal(err)
}
dir, err := filepath.Abs(filepath.Join(filepath.Dir(wd), "pkg", "coverage", "testdata"))
dir, err := filepath.Abs(filepath.Join(filepath.Dir(wd), "coverage", "testdata"))
if err != nil {
t.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/octocov_parallel_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ coverage:
- ../coverage_other.out
testExecutionTime:
steps:
- Run tests pkg/coverage
- Run tests pkg/ratio
- Run tests pkg/badge
- Run tests coverage
- Run tests ratio
- Run tests badge
- Run tests other
comment:
if: false
Expand Down

0 comments on commit 9e8ee52

Please sign in to comment.