Skip to content
Merged
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
21 changes: 13 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,30 +377,35 @@ tasks:

test:
desc: Run unit and acceptance tests
deps:
- task: test-unit
- task: test-acc
vars:
ACCEPTANCE_TEST_FILTER: "{{.ACCEPTANCE_TEST_FILTER}}"
# Run the legs as sequential cmds (not parallel deps) so the concatenating

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep parallel runs though? it saves time

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not possible, then we can concatenate outside of taskfile

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I measure the diff and it is negligible. Each test run already saturates CPU. See #5802.

# cat can be a `defer`, which runs even when a leg fails. When the legs are
# deps, the cat in cmds is skipped on failure, so test-output.json is never
# produced for a failed run and CI has no gotestsum output to upload.
sources:
- test-output-unit.json
- test-output-acc.json
generates:
- test-output.json
cmds:
- cat test-output-unit.json test-output-acc.json > test-output.json
- defer: cat test-output-unit.json test-output-acc.json > test-output.json
- task: test-unit
- task: test-acc
vars:
ACCEPTANCE_TEST_FILTER: "{{.ACCEPTANCE_TEST_FILTER}}"

test-unit:
desc: Run unit tests across all Go modules (root, tools, codegen)
deps: ['test-unit-root', 'test-unit-tools', 'test-unit-codegen']
sources:
- test-output-unit-root.json
- tools/test-output-unit-tools.json
- bundle/internal/tf/codegen/test-output-unit-codegen.json
generates:
- test-output-unit.json
cmds:
- cat test-output-unit-root.json tools/test-output-unit-tools.json bundle/internal/tf/codegen/test-output-unit-codegen.json > test-output-unit.json
- defer: cat test-output-unit-root.json tools/test-output-unit-tools.json bundle/internal/tf/codegen/test-output-unit-codegen.json > test-output-unit.json
- task: test-unit-root
- task: test-unit-tools
- task: test-unit-codegen

test-unit-root:
desc: Run unit tests in root module
Expand Down
Loading