Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
44dbfe5
feat: turborepo ci commands and jobs (ENG-600)
effervescentia Jun 19, 2025
d4f102a
refactor: simplify
effervescentia Jun 19, 2025
66122cf
fix: remove unused param
effervescentia Jun 19, 2025
83ea85e
fix: reorder
effervescentia Jun 19, 2025
de2488b
fix: param type
effervescentia Jun 19, 2025
6649438
ci: updated hadolint
effervescentia Jun 19, 2025
b654dd0
feat: more
effervescentia Jun 19, 2025
339da86
chore: add debug logging
effervescentia Jul 8, 2025
595e9b5
chore: more debugging
effervescentia Jul 8, 2025
f5bee89
feat: encode hash
effervescentia Jul 9, 2025
f12eec5
fix: use correct parameters variable
effervescentia Jul 9, 2025
10e9abc
fix: break up commands for debugging
effervescentia Jul 9, 2025
f6db27e
fix: syntax
effervescentia Jul 9, 2025
2016530
fix: storing artifacts
effervescentia Jul 9, 2025
8508d4b
chore: better caching
effervescentia Jul 9, 2025
5d7fb70
chore: remove debug logging
effervescentia Jul 9, 2025
c75d5d0
fix: create hashfiles folder
effervescentia Jul 9, 2025
519a63f
fix: restore build cache optionally for dependency tests
effervescentia Jul 9, 2025
fad9761
feat: new job
effervescentia Jul 9, 2025
b2d245e
fix: remove unused param
effervescentia Jul 9, 2025
a396341
fix: jq syntax
effervescentia Jul 9, 2025
eec0f8b
feat: caching without hashfiles
effervescentia Jul 9, 2025
69c7d22
fix: add parameter type
effervescentia Jul 9, 2025
4d428f4
fix: inline refs
effervescentia Jul 9, 2025
f14fe79
feat: turborepo schema validation with caching
effervescentia Jul 9, 2025
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
17 changes: 17 additions & 0 deletions src/commands/turborepo/turborepo_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
parameters:
cache_prefix:
description: Cache prefix
type: string
default: ''
command:
description: Script to install dependencies
type: string
default: yarn install --immutable
steps:
- authenticate_npm
- vf_restore_cache:
cache_prefix: turbo-<< parameters.cache_prefix >>
- run:
command: << parameters.command >>
- vf_save_cache:
cache_prefix: turbo-<< parameters.cache_prefix >>
9 changes: 9 additions & 0 deletions src/commands/turborepo/turborepo_persist_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
coverage_dir:
description: Directory containing coverage information
type: string
steps:
- persist_to_workspace:
root: "."
paths:
- << parameters.coverage_dir >>
25 changes: 25 additions & 0 deletions src/commands/turborepo/turborepo_restore_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
parameters:
prefix:
description: Cache prefix
type: string
build_prefix:
description: Build cache prefix to pull from as a fallback
type: string
default: ''
steps:
- when:
condition: << parameters.build_prefix >>
steps:
- restore_cache:
keys:
- << parameters.prefix >>-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}
- << parameters.build_prefix >>-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}
- << parameters.prefix >>-{{ .Environment.CACHE_VERSION }}-master
- << parameters.build_prefix >>-{{ .Environment.CACHE_VERSION }}-master
- unless:
condition: << parameters.build_prefix >>
steps:
- restore_cache:
keys:
- << parameters.prefix >>-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}
- << parameters.prefix >>-{{ .Environment.CACHE_VERSION }}-master
13 changes: 13 additions & 0 deletions src/commands/turborepo/turborepo_save_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
parameters:
prefix:
description: Cache prefix
type: string
path:
description: Cached path
type: string
default: ./.turbo
steps:
- save_cache:
key: << parameters.prefix >>-{{ .Environment.CACHE_VERSION }}-{{ .Branch }}
paths:
- << parameters.path >>
9 changes: 9 additions & 0 deletions src/commands/turborepo/turborepo_store_test_results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
report_name:
description: Report name
type: string
steps:
- store_test_results:
path: << parameters.report_name >>
- store_artifacts:
path: << parameters.report_name >>
1 change: 0 additions & 1 deletion src/commands/yarn/vf_save_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ steps:
- << parameters.working_directory >>/.yarn/cache
- << parameters.working_directory >>/.yarn/install-state.gz
- << parameters.working_directory >>/node_modules
- ~/.cache/Cypress

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.

not using cypress anymore

21 changes: 21 additions & 0 deletions src/jobs/turborepo/turborepo_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to execute build
type: string
default: yarn build
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
prefix: build-cache
- run:
command: << parameters.command >>
- turborepo_save_cache:
prefix: build-cache
21 changes: 21 additions & 0 deletions src/jobs/turborepo/turborepo_dependency_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to check dependencies
type: string
default: yarn test:dependencies
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
prefix: dependencies-test-cache
- run:
command: << parameters.command >>
- turborepo_save_cache:
prefix: dependencies-test-cache
28 changes: 28 additions & 0 deletions src/jobs/turborepo/turborepo_integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to execute tests
type: string
default: yarn test:integration
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
prefix: build-cache
# needed because integration tests use testcontainers which starts docker containers
- setup_remote_docker:
version: default
- run:
command: |
yarn build
<< parameters.command >>
- turborepo_store_test_results:
report_name: ./integration.report.xml
- turborepo_persist_coverage:
coverage_dir: ./sonar/integration-coverage
18 changes: 18 additions & 0 deletions src/jobs/turborepo/turborepo_lint_dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to lint dockerfiles
type: string
default: yarn lint:dockerfiles
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- install_latest_hadolint
- run:
command: << parameters.command >>
26 changes: 26 additions & 0 deletions src/jobs/turborepo/turborepo_lint_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to lint files
type: string
default: yarn lint:report
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
prefix: eslint-cache
- run:
command: << parameters.command >>
- turborepo_save_cache:
prefix: eslint-cache
path: ./.eslintcache
- store_test_results:
path: ./reports/lint.report.xml
- store_artifacts:
path: ./reports/lint.report.xml
12 changes: 12 additions & 0 deletions src/jobs/turborepo/turborepo_sonarcloud_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: java-executor
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- sonarcloud/scan:
cache_version: 3
22 changes: 22 additions & 0 deletions src/jobs/turborepo/turborepo_types_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to check types
type: string
default: yarn test:types
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
build_prefix: build-cache
prefix: types-test-cache
- run:
command: << parameters.command >>
- turborepo_save_cache:
prefix: types-test-cache
25 changes: 25 additions & 0 deletions src/jobs/turborepo/turborepo_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
parameters:
executor:
description: Executor to run the command on
type: executor
default: node-executor-node-20
command:
description: Script to execute tests
type: string
default: yarn test:unit
executor: << parameters.executor >>
steps:
- checkout_clone
- attach_workspace:
at: ~/voiceflow
- turborepo_install
- turborepo_restore_cache:
prefix: build-cache
- run:
command: |
yarn build
<< parameters.command >>
- turborepo_store_test_results:
report_name: ./unit.report.xml
- turborepo_persist_coverage:
coverage_dir: ./sonar/unit-coverage