Skip to content

Commit

Permalink
feat: restore earthfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kukkok3 committed Sep 26, 2024
1 parent 67fa4b4 commit 80942f7
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions catalyst_voices/test_driver/Earthfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# TODO(minikin): Temporary disabled until we have useful integration tests.
VERSION 0.8

# IMPORT ../ AS catalyst-voices
IMPORT ../ AS catalyst-voices

# integration-test-web:
# FROM catalyst-voices+build-web
# ARG TARGETARCH
# ARG browser
# LET driver_port = 4444
integration-test-web:
FROM catalyst-voices+build-web
ARG TARGETARCH
ARG browser
LET driver_port = 4444

# IF [ $browser = "chrome" ]
# LET driver = "chromedriver"
# END
IF [ $browser = "chrome" ]
LET driver = "chromedriver"
END

# IF [ $browser = "firefox" ]
# LET driver = "geckodriver"
# END
# # Commenting out Edge tests as they are failing due to:
# # https://github.com/flutter/flutter/issues/76213
# # https://github.com/flutter/flutter/issues/142021
# #IF [ $browser = "edge" && $TARGETARCH = "amd64" ]]
# # LET driver = "msedgedriver"
# #END
# RUN ($driver --port=$driver_port > $driver.log &) && \
# flutter drive --driver=test_driver/integration_tests.dart \
# --target=integration_test/main.dart \
# --flavor development -d web-server --profile \
# --browser-name=$browser --driver-port=$driver_port || echo fail > fail
# # Using WAIT instead of TRY because TRY/CATCH/FINALLY does not (currently) support expanding args for SAVE ARTIFACT paths
# WAIT
# SAVE ARTIFACT $driver.log AS LOCAL $driver.log
# END
# IF [ -f fail ]
# RUN echo ""$browser" integration test failed" && \
# echo "Printing "$driver" logs..." && \
# cat $driver.log && \
# exit 1
# END
IF [ $browser = "firefox" ]
LET driver = "geckodriver"
END
# Commenting out Edge tests as they are failing due to:
# https://github.com/flutter/flutter/issues/76213
# https://github.com/flutter/flutter/issues/142021
IF [ $browser = "edge" && $TARGETARCH = "amd64" ]]
# LET driver = "msedgedriver"
END
RUN ($driver --port=$driver_port > $driver.log &) && \
flutter drive --driver=test_driver/integration_tests.dart \
--target=integration_test/app_test.dart \
--flavor development -d web-server --profile \
--browser-name=$browser --driver-port=$driver_port || echo fail > fail
# Using WAIT instead of TRY because TRY/CATCH/FINALLY does not (currently) support expanding args for SAVE ARTIFACT paths
WAIT
SAVE ARTIFACT $driver.log AS LOCAL $driver.log
END
IF [ -f fail ]
RUN echo ""$browser" integration test failed" && \
echo "Printing "$driver" logs..." && \
cat $driver.log && \
exit 1
END

# test-web-all:
# BUILD +integration-test-web \
# --browser=chrome \
# --browser=firefox
test-web-all:
BUILD +integration-test-web \
--browser=chrome \
--browser=firefox

0 comments on commit 80942f7

Please sign in to comment.