Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

ci: wip #41

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions ci/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
8 changes: 5 additions & 3 deletions ci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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?)?
Expand Down Expand Up @@ -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", "./..."})
}