Skip to content

Commit

Permalink
Switch to saving ci-checks-js.sh logs to logs/ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Aug 4, 2023
1 parent 06d9c63 commit 3fa12f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
echo "--- :node: Lint and Unit Tests"
./bin/ci-checks-js.sh
artifact_paths:
- ./*-tests-out.log
- ./logs/*.log

- label: "Build JS Bundles"
depends_on: "unit-tests"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ buck-out/
#
# These are generated only via `bin/ci-checks-js.sh`, so unlikely to appear on a dev machine.
# Still, it's worth ignoring just to avoid these getting committed by accident while testing the CI workflow locally.
*-test-out.log
/logs/*

# e2e output log
appium-out.log
Expand Down
6 changes: 4 additions & 2 deletions bin/ci-checks-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ fi

# Notice we forward the tests output to a file.
# That's because they generates 70k+ lines and we don't want to pollute the logs like that.
LOGS_DIR=./logs
mkdir -p $LOGS_DIR
if [ "$CHECK_TESTS" = true ] ; then
# we'll run the tests twice (once for each platform) if the platform env var is not set
if [[ -z "${TEST_RN_PLATFORM:-}" ]] ; then
echo "--- :microscope: :android: Unit tests"
TEST_RN_PLATFORM=android npm run test --maxWorkers=4 > android-tests-out.log || pFail
TEST_RN_PLATFORM=android npm run test --maxWorkers=4 > "$LOGS_DIR/android-tests-out.log" || pFail
echo "--- :microscope: :ios: Unit tests"
TEST_RN_PLATFORM=ios npm run test --maxWorkers=4 > ios-tests-out.log || pFail
TEST_RN_PLATFORM=ios npm run test --maxWorkers=4 > "$LOGS_DIR/ios-tests-out.log" || pFail
else
echo "--- :microscope: :$TEST_RN_PLATFORM: Unit tests"
npm run test --maxWorkers=4 > "$TEST_RN_PLATFORM-tests-out.log" || pFail
Expand Down

0 comments on commit 3fa12f8

Please sign in to comment.