Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
21d94d2
fix promo spread
gabrielburnworth Jan 7, 2026
4284e17
handle invalid dev camera setting
gabrielburnworth Jan 8, 2026
19270dc
add 3D camera view visual
gabrielburnworth Jan 8, 2026
7bb7e6c
improve 3d camera view geometry
gabrielburnworth Jan 14, 2026
909f561
remove interior of 3d camera view geometry
gabrielburnworth Jan 14, 2026
d9c1e5e
add rotation to 3D camera view visual
gabrielburnworth Jan 15, 2026
4e92ba5
add camera view settings to promo
gabrielburnworth Jan 15, 2026
5da27d6
add extra rotation to 3D images
gabrielburnworth Jan 16, 2026
360cadf
upgrade deps (ruby)
gabrielburnworth Jan 16, 2026
e294eff
fix degrees to radians conversion
roryaronson Jan 17, 2026
0dad411
add extraRotation to camera view frustum
roryaronson Jan 17, 2026
74476fc
add 3D capture animation
gabrielburnworth Jan 21, 2026
2750222
add fps probe
gabrielburnworth Jan 23, 2026
2c5b2f9
cache and compare fps value
gabrielburnworth Jan 29, 2026
0b63d29
reduce number of suns from 4 to 1
gabrielburnworth Jan 29, 2026
e1d6327
shadows={"variance"}
roryaronson Jan 29, 2026
b250be4
shadows={"variance"} on /promo too
roryaronson Jan 29, 2026
8a28c69
fix soil shadows and test
roryaronson Jan 29, 2026
34b44a8
fade ground with distance
roryaronson Jan 29, 2026
cf4d8a6
add electronics box shadow
roryaronson Jan 29, 2026
6848d63
improve ci workflow
gabrielburnworth Jan 29, 2026
8d8edd5
remove unused setting
gabrielburnworth Jan 29, 2026
bcf6ab1
prevent beacons from casting shadows
gabrielburnworth Jan 29, 2026
069c7df
add notification with diff link
gabrielburnworth Jan 29, 2026
210a77f
extra rotation fix
roryaronson Jan 30, 2026
fd1e013
additional console stats
roryaronson Jan 30, 2026
f2954ef
change default time to 4pm
roryaronson Jan 30, 2026
1d6be48
add scene metrics collection
gabrielburnworth Jan 30, 2026
6362561
fix light ref
gabrielburnworth Jan 30, 2026
4637a3b
instance plant icons
gabrielburnworth Feb 4, 2026
cd524cf
improve config menu
gabrielburnworth Feb 4, 2026
caf93ba
use MeshBasicMaterial for plants
roryaronson Feb 4, 2026
826e065
merge grid geometry
roryaronson Feb 4, 2026
861436b
instanced cc supports
roryaronson Feb 4, 2026
8566253
import fix
roryaronson Feb 4, 2026
63cc235
add icon brightness change test
gabrielburnworth Feb 4, 2026
eb84182
instance plant spread spheres
gabrielburnworth Feb 6, 2026
c546ed4
bun
roryaronson Feb 6, 2026
a3b3f6c
try test-slow
roryaronson Feb 7, 2026
5131730
update tests for bun test
roryaronson Feb 7, 2026
3703fec
revert CI commands to test
roryaronson Feb 7, 2026
e209e46
cleanup
roryaronson Feb 7, 2026
294c0f3
run bun test directly
roryaronson Feb 7, 2026
cb39357
update flaky tests
roryaronson Feb 7, 2026
74945e4
disable eslint cache
roryaronson Feb 7, 2026
4cc0206
fix flaky tests
roryaronson Feb 7, 2026
e535da6
fix flaky tests
roryaronson Feb 7, 2026
77f729b
try --max-concurrency=1
roryaronson Feb 10, 2026
b13fddd
Revert "try --max-concurrency=1"
roryaronson Feb 10, 2026
fad86eb
fix flaky tests part 3
roryaronson Feb 10, 2026
76ded5e
lint
roryaronson Feb 10, 2026
4f4a57c
fix a few tests
roryaronson Feb 11, 2026
8ee35d9
improve bun test runs
gabrielburnworth Feb 11, 2026
8b5e30f
fix missing login screen background
gabrielburnworth Feb 11, 2026
d2ace0b
perform minor cleanup of bun branch
gabrielburnworth Feb 11, 2026
c8c9805
fix tsc errors
gabrielburnworth Feb 11, 2026
70d0bcb
improve compile cleanup step
gabrielburnworth Feb 11, 2026
9d49d49
remove node
roryaronson Feb 12, 2026
e030ce3
remove parcel
roryaronson Feb 12, 2026
4c643fb
css fix
roryaronson Feb 12, 2026
28d6606
add back node removal
gabrielburnworth Feb 12, 2026
6b9e3cb
Merge branch 'staging' into bun
gabrielburnworth Feb 12, 2026
d417b70
fix tests
gabrielburnworth Feb 12, 2026
2a23db1
cleanup cleanup
gabrielburnworth Feb 12, 2026
eb53397
fix lint error
gabrielburnworth Feb 12, 2026
54db050
change fps collection to use XL and spread
gabrielburnworth Feb 6, 2026
3625baf
increase timeouts
gabrielburnworth Feb 6, 2026
25b931b
fix ci test output
gabrielburnworth Feb 12, 2026
7fadbec
RTL part 1
roryaronson Feb 12, 2026
daa62db
update artifact name
gabrielburnworth Feb 12, 2026
362f6ec
RTL part 2
roryaronson Feb 12, 2026
82bc6e8
RTL part 3 (remove enzyme)
roryaronson Feb 12, 2026
3bcdaf3
tighten enzyme -> RTL progress check
roryaronson Feb 12, 2026
72a0c52
Merge branch 'bun' of https://github.com/FarmBot/Farmbot-Web-App into…
roryaronson Feb 12, 2026
7a6f494
RTL part 4
roryaronson Feb 13, 2026
a92c807
Merge branch 'staging' into bun
roryaronson Feb 13, 2026
8808897
remove checklist
roryaronson Feb 13, 2026
cdc299c
remove randomize=false config
roryaronson Feb 13, 2026
ab3d387
fix mock leakage in tests
gabrielburnworth Feb 26, 2026
2769e75
fix linter errors
gabrielburnworth Feb 26, 2026
8afad78
fix fe upgrades
gabrielburnworth Feb 26, 2026
05a3708
fix linter/test properly
gabrielburnworth Feb 26, 2026
72c66ac
add irb
gabrielburnworth Feb 26, 2026
cd4a4b9
upgrade deps (react/three)
gabrielburnworth Feb 27, 2026
65aa606
upgrade deps (eslint)
gabrielburnworth Feb 27, 2026
f2f24e2
clean up circleci config
gabrielburnworth Feb 27, 2026
ef60652
fix add new curve save bug
gabrielburnworth Mar 4, 2026
2e96b7e
fix add point grid warning
gabrielburnworth Mar 4, 2026
2819494
upgrade rails (7.0)
gabrielburnworth Mar 5, 2026
86681fd
upgrade rails (7.1)
gabrielburnworth Mar 5, 2026
01d278b
upgrade rails (7.2)
gabrielburnworth Mar 5, 2026
b632f34
upgrade rails (8.0)
gabrielburnworth Mar 5, 2026
001db07
upgrade rails (8.1)
gabrielburnworth Mar 5, 2026
2870b15
upgrade deps
gabrielburnworth Mar 5, 2026
07640cd
fix electronics box model bug
gabrielburnworth Mar 6, 2026
ce55f9e
fix new curve deletion bug
gabrielburnworth Mar 6, 2026
5417553
fix rake task warnings
gabrielburnworth Mar 6, 2026
6956226
fix 3D camera load bug
gabrielburnworth Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
325 changes: 246 additions & 79 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,81 @@ executors:
working_directory: /home/circleci/project

commands:
build-commands:
start-commands:
steps:
- checkout
- restore_cache:
keys:
- cache-v1-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
- send-notification:
message: "CI run started"
- send-notification:
message: "<${CIRCLE_BUILD_URL}|logs>"
- run:
name: After cache restore
name: Create compare link
command: |
git clean -xdn
mkdir -p docker_cache
ls docker_cache
#sudo docker images
#if [ -f docker_cache/images.tar.gz ]; then gunzip -c docker_cache/images.tar.gz | sudo docker load; fi
DEPLOYS_URL_API="https://api.github.com/repos/Farmbot/Farmbot-Web-App/deployments"
COMPARE_URL_WEB="https://github.com/Farmbot/Farmbot-Web-App/compare/"
data=$(curl -fsS "$DEPLOYS_URL_API") || data="[]"
last_sha=$(printf "%s" "$data" | python -c 'import json,sys; data=json.loads(sys.stdin.read() or "[]"); deploy_index=0; sha=(data[deploy_index] or {}).get("sha"); print(sha or "")')
compare_url="$COMPARE_URL_WEB$last_sha...${CIRCLE_SHA1}"
echo "$compare_url"
echo "export COMPARE_URL='$compare_url'" >> "$BASH_ENV"
- send-notification:
message: "<$COMPARE_URL|diff>"
send-notification:
parameters:
message:
type: string
when:
type: enum
enum: ["on_success", "on_fail", "always"]
default: "always"
steps:
- when:
condition:
equal: [staging, << pipeline.git.branch >>]
steps:
- run:
name: "Send notification: << parameters.message >>"
when: << parameters.when >>
command: |
if [ -n "$SLACK_WEBHOOK_URL" ]; then
curl -fsS -X POST -H "Content-Type: application/json" \
--data "{\"text\":\"<< parameters.message >>\",\"channel\":\"#software\"}" \
"$SLACK_WEBHOOK_URL" || true
fi
build-commands:
steps:
- run:
name: Build and Install Deps
command: |
mv .circleci/circle_envs .env
echo -e '\ndocker_volumes/db/pg_wal/*' >> .dockerignore
sudo docker compose build web
sudo docker compose run web gem install bundler
sudo docker compose run web bundle install
sudo docker compose run web npm install
sudo docker compose run web bundle exec rails db:create
sudo docker compose run web bundle exec rails db:migrate
sudo docker compose run web bundle exec rake keys:generate
- run:
name: After cache update
command: |
mkdir -p /tmp/test-results
git clean -xdn
ls docker_cache
#sudo docker images
#if [ ! -f docker_cache/images.tar.gz ]; then sudo docker save $(sudo docker images ruby -q) | gzip > docker_cache/images.tar.gz; fi
# - save_cache:
# key: cache-v1-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
# paths:
# - docker_volumes
# - node_modules
# - docker_cache
if sudo docker compose run --rm web bash -lc '\
gem install bundler && \
bundle install && \
bun install && \
bundle exec rails db:create && \
bundle exec rails db:migrate && \
bundle exec rake keys:generate \
'; then
echo "export SETUP_OK=true" >> "$BASH_ENV"
else
echo "export SETUP_OK=false" >> "$BASH_ENV"
exit 1
fi
rspec-commands:
steps:
- run:
name: Run Ruby Tests
command: |
sudo docker compose run web bundle exec rspec spec --format progress --format RspecJunitFormatter --out /tmp/test-results/rspec/rspec.xml
sudo docker compose run --rm web bundle exec rspec spec --format progress --format RspecJunitFormatter --out test-results/rspec.xml
- run:
name: Check app coverage status
command: |
sudo docker compose run web bundle exec rake check_file_coverage:api || [ $CIRCLE_BRANCH == "staging" ]
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose run --rm web bundle exec rake check_file_coverage:api || [ $CIRCLE_BRANCH == "staging" ]
when: always
- run:
name: Upload app coverage to Codecov
Expand All @@ -70,32 +95,59 @@ commands:
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
./codecov -t $CODECOV_TOKEN -f coverage_api/coverage.xml
jest-commands:
js-test-commands:
steps:
- run:
name: Run JS tests
command: |
sudo docker compose run web npm run test-slow -- -c .circleci/jest-ci.config.js -w 6
sudo docker compose run --rm web bun test --reporter=junit --reporter-outfile=test-results/junit.xml
echo 'export COVERAGE_AVAILABLE=true' >> $BASH_ENV
lint-commands:
steps:
- run:
name: Run JS Linters
command: |
sudo docker compose run web npm run linters
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose run --rm web bun run linters
when: always
bun-build-commands:
steps:
- run:
name: Check bun build
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose run --rm web bundle exec rake assets:precompile 2>&1 | tee assets_precompile.log
printf -- '-%.0s' {1..50}; printf '\n'
if grep -Ei '^(warn|error):' assets_precompile.log; then
exit 1
fi
when: always
coverage-commands:
steps:
- run:
name: Check frontend coverage status
command: |
sudo docker compose run -e CIRCLE_SHA1="$CIRCLE_SHA1" -e CIRCLE_BRANCH="$CIRCLE_BRANCH" -e CIRCLE_PULL_REQUEST="$CIRCLE_PULL_REQUEST" web bundle exec rake coverage:run || [ $CIRCLE_BRANCH == "staging" ]
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose run --rm -e CIRCLE_SHA1="$CIRCLE_SHA1" -e CIRCLE_BRANCH="$CIRCLE_BRANCH" -e CIRCLE_PULL_REQUEST="$CIRCLE_PULL_REQUEST" web bundle exec rake coverage:run || [ $CIRCLE_BRANCH == "staging" ]
when: always
- run:
name: Check frontend file coverage status
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
changed=$(git diff --name-only staging...HEAD | tr '\n' ',' | sed 's/,$//') || true
sudo docker compose run -e CHANGED_FILES="$changed" web bundle exec rake check_file_coverage:fe || true
sudo docker compose run --rm -e CHANGED_FILES="$changed" web bundle exec rake check_file_coverage:fe || true
when: always
- run:
name: Report frontend coverage to Coveralls
Expand All @@ -111,61 +163,176 @@ commands:
fi
if [ "$CIRCLE_BRANCH" == "staging" ]; then echo; fi
when: always # change to `on_success` for a stricter comparison
render-commands:
steps:
- run:
name: Start services
when: always
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose up -d
sudo docker compose ps
- run:
name: Install playwright
when: always
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
sudo docker compose exec -e PLAYWRIGHT_BROWSERS_PATH=0 web bunx playwright install chromium --with-deps
- run:
name: Wait for load
when: always
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
for i in $(seq 1 90); do
if curl -fsS "http://127.0.0.1:3000/promo" >/dev/null; then
echo "web is up"
exit 0
fi
sleep 2
done

echo "timeout"
sudo docker compose logs --no-color --tail=300 web
exit 1
- run:
name: Run playwright
when: always
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "skipping"
exit 0
fi
attempts=2
for _ in $(seq 1 "$attempts"); do
url="http://localhost:3000/promo?sizePreset=Genesis+XL&promoSpread=true"
echo "Attempting FPS check via ${url}"
if ! sudo docker compose exec web curl -I "${url}" >/dev/null; then
continue
fi

if ! fps_output=$(sudo docker compose exec -e PLAYWRIGHT_BROWSERS_PATH=0 web bun scripts/fps.js "${url}" "tmp/promo.png"); then
echo "${fps_output}"
continue
fi
echo "${fps_output}"

fps_value=$(echo "${fps_output}" | awk -F= '/^FPS_VALUE=/{print $2; exit}')
scene_metrics=$(echo "${fps_output}" | awk -F= '/^SCENE_METRICS=/{print $2; exit}')
echo "export FPS_VALUE=${fps_value}" >> "$BASH_ENV"
echo "export SCENE_METRICS=\"${scene_metrics}\"" >> "$BASH_ENV"

exit 0
done

echo "FPS check failed for all URLs"
exit 1
- restore_cache:
keys:
- fps_value-staging-
- run:
name: Load previous value
when: always
command: |
if [ -f fps_value.txt ]; then
PREV=$(cat fps_value.txt)
else
PREV=0.75
fi
echo "Previous value: $PREV fps"
echo "export PREV_VALUE=$PREV" >> $BASH_ENV
- run:
name: Compare value
when: always
command: |
percent_change=$(python -c 'import os; fps=float(os.environ.get("FPS_VALUE","0") or 0); prev=float(os.environ.get("PREV_VALUE","0") or 0); print("n/a" if prev==0 else f"{((fps-prev)/prev)*100:.2f}")')
echo "$FPS_VALUE fps ($percent_change% change)"
echo "export PERCENT_CHANGE=$percent_change" >> "$BASH_ENV"
- run:
name: Save new value
command: |
echo "$FPS_VALUE"
echo "$FPS_VALUE" > fps_value.txt
if [ ! -f scene_metrics.csv ]; then
printf '%s\n' "epoch, FPS, Calls, Triangles, Points, Lines, Geometries, Textures, Objects, Meshes, Instanced meshes" > scene_metrics.csv
fi
printf '%s\n' "$SCENE_METRICS" >> scene_metrics.csv
cat scene_metrics.csv
- save_cache:
key: fps_value-{{ .Branch }}-{{ epoch }}
paths:
- fps_value.txt
- scene_metrics.csv
- send-notification:
message: "$FPS_VALUE fps (${PERCENT_CHANGE}% change)"
- run:
name: On failure
when: on_fail
command: |
if [ "$SETUP_OK" != "true" ]; then
echo "setup failed"
exit 0
fi
sudo docker compose ps
sudo docker compose logs --no-color --tail=500
- store_artifacts:
path: tmp/promo.png
destination: promo_xl.png
- store_artifacts:
path: scene_metrics.csv
destination: scene_metrics.csv
end-commands:
steps:
- run:
name: Fetch first artifact URL
command: |
project_slug="gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
artifacts_json=$(curl -fsS \
-H "Accept: application/json" \
"https://circleci.com/api/v2/project/${project_slug}/${CIRCLE_BUILD_NUM}/artifacts")
artifact_url=$(printf "%s" "$artifacts_json" | python -c 'import json,sys; data=json.load(sys.stdin); items=data.get("items") or []; print(items[0].get("url","") if items else "")')
echo "export ARTIFACT_URL=$artifact_url" >> "$BASH_ENV"
- send-notification:
message: "CI run succeeded"
when: on_success
- send-notification:
message: "<$ARTIFACT_URL|screenshot>"
when: on_success
- send-notification:
message: "CI run failed"
when: on_fail



workflows:
version: 2
build_and_test:
max_auto_reruns: 1
# max_auto_reruns: 1
jobs:
#- build
- all
#- test-api:
# requires:
# - build
#- run-linters:
# requires:
# - build
#- test-fe:
# requires:
# - build

jobs:
build:
executor: build-executor
steps:
- build-commands
all:
executor: build-executor
steps:
- start-commands
- checkout
- run: mkdir -p test-results
- build-commands
- rspec-commands
- lint-commands
- jest-commands
- bun-build-commands
- js-test-commands
- store_test_results:
path: /tmp/test-results
path: test-results
- coverage-commands
test-api:
executor: build-executor
steps:
- build-commands
- rspec-commands
- store_test_results:
path: /tmp/test-results
run-linters:
executor: build-executor
steps:
- build-commands
- lint-commands
test-fe:
executor: build-executor
parallelism: 4
steps:
- build-commands
- run:
name: Run JS Tests
command: |
circleci tests glob **/__tests__/**/*.ts* | circleci tests split > /tmp/tests-to-run
sudo docker compose run web npm run test-very-slow -- -c .circleci/jest-ci.config.js $(cat /tmp/tests-to-run)
- store_test_results:
path: /tmp/test-results
- render-commands
- end-commands
Loading