1
0
mirror of https://github.com/go-task/task.git synced 2025-06-23 00:38:19 +02:00

fix(checker): use only one checker at the same time to improve perf (#2031)

* fix(checker): use only one checker at the same time to improve performance

* refactor

* fix test
This commit is contained in:
Valentin Maerten
2025-02-08 17:34:04 +01:00
committed by GitHub
parent 9009124192
commit c995fe6d11
4 changed files with 35 additions and 15 deletions

View File

@ -969,10 +969,13 @@ func TestStatusVariables(t *testing.T) {
Verbose: true,
}
require.NoError(t, e.Setup())
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build"}))
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-checksum"}))
assert.Contains(t, buff.String(), "3e464c4b03f4b65d740e1e130d4d108a")
buff.Reset()
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-ts"}))
inf, err := os.Stat(filepathext.SmartJoin(dir, "source.txt"))
require.NoError(t, err)
ts := fmt.Sprintf("%d", inf.ModTime().Unix())
@ -1002,10 +1005,12 @@ func TestCmdsVariables(t *testing.T) {
Verbose: true,
}
require.NoError(t, e.Setup())
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build"}))
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-checksum"}))
assert.Contains(t, buff.String(), "3e464c4b03f4b65d740e1e130d4d108a")
buff.Reset()
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "build-ts"}))
inf, err := os.Stat(filepathext.SmartJoin(dir, "source.txt"))
require.NoError(t, err)
ts := fmt.Sprintf("%d", inf.ModTime().Unix())