Skip to content

Commit

Permalink
Add test step to ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
buehlmann committed Nov 13, 2024
1 parent 324ce47 commit 608ca56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func (m *Ci) Test(ctx context.Context, dir *dagger.Directory) *dagger.Container
WithExec([]string{"bundle", "exec", "rails", "db:create"}).
WithExec([]string{"bundle", "exec", "rails", "db:migrate"}).
WithExec([]string{"bundle", "exec", "rails", "assets:precompile"}).
Terminal().
WithExec([]string{"bundle", "exec", "rails", "test", "test/controllers", "test/domain", "test/fabricators", "test/fixtures", "test/helpers", "test/mailers", "test/models", "test/presenters", "test/support", "test/tarantula"})
}

Expand Down Expand Up @@ -177,7 +178,7 @@ func (m *Ci) Ci(ctx context.Context, dir *dagger.Directory) *Results {
// Executes all the steps and returns a Results object
func (m *Ci) CiIntegration(ctx context.Context, dir *dagger.Directory) *Results {
var wg sync.WaitGroup
wg.Add(4)
wg.Add(5)

var lintOutput = func() *dagger.File {
defer wg.Done()
Expand All @@ -199,6 +200,11 @@ func (m *Ci) CiIntegration(ctx context.Context, dir *dagger.Directory) *Results
return m.Build(ctx, dir)
}()

go func() {
defer wg.Done()
m.Test(ctx, dir)
}()

// This Blocks the execution until its counter become 0
wg.Wait()

Expand Down

0 comments on commit 608ca56

Please sign in to comment.