diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7b8c7aa..74f0339 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: with: verb: call module: github.com/${{ github.repository }}/ci@${{ github.ref }} - args: --checkout ${{ github.ref }} ci + args: --checkout ${{ github.ref }} build binary size cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} version: "0.9.7" diff --git a/ci/build.go b/ci/build.go index 51c3cc0..73ab064 100644 --- a/ci/build.go +++ b/ci/build.go @@ -84,6 +84,8 @@ func (m *Build) binary(platform Platform, version string) *File { return dag.Go(GoOpts{ Version: goVersion, }). + WithModuleCache(dag.CacheVolume("benthos-openmeter-go-mod")). + WithBuildCache(dag.CacheVolume("benthos-openmeter-go-build")). WithPlatform(string(platform)). WithCgoDisabled(). WithSource(m.Source). diff --git a/ci/main.go b/ci/main.go index 5a0b58f..69bb784 100644 --- a/ci/main.go +++ b/ci/main.go @@ -82,9 +82,9 @@ func (m *Ci) Ci(ctx context.Context) error { return err }) - group.Go(func() error { - return m.Lint().All(ctx) - }) + // group.Go(func() error { + // return m.Lint().All(ctx) + // }) // TODO: run trivy scan on container(s?) // TODO: version should be the commit hash (if any?)? @@ -128,6 +128,8 @@ func (m *Ci) Test() *Container { return dag.Go(GoOpts{ Version: goVersion, }). + WithModuleCache(dag.CacheVolume("benthos-openmeter-go-mod")). + WithBuildCache(dag.CacheVolume("benthos-openmeter-go-build")). WithSource(m.Source). Exec([]string{"go", "test", "-v", "./..."}) }