diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6de8f98..c8b2370b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,10 +42,10 @@ jobs: run: yarn run build:prod - name: Run smoke test - run: VERBOSE=1 DEBUG=1 GRIST_LOG_LEVEL=error MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:smoke + run: VERBOSE=1 DEBUG=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:smoke - name: Run main tests - run: VERBOSE=1 DEBUG=1 GRIST_LOG_LEVEL=error MOCHA_WEBDRIVER_HEADLESS=1 yarn run test + run: MOCHA_WEBDRIVER_HEADLESS=1 yarn run test - name: Update candidate branch if: ${{ github.event_name == 'push' }} diff --git a/test/test_under_docker.sh b/test/test_under_docker.sh index 0a9237c2..6e97c171 100755 --- a/test/test_under_docker.sh +++ b/test/test_under_docker.sh @@ -3,7 +3,7 @@ # This runs browser tests with the server started using docker, to # catch any configuration problems. # Run with MOCHA_WEBDRIVER_HEADLESS=1 for headless operation. -# Run with VERBOSE=1 for server logs. +# Run with DEBUG=1 for server logs. # Settings for script robustness set -o pipefail # trace ERR through pipes @@ -28,12 +28,18 @@ cleanup() { exit $return_value } +GRIST_LOG_LEVEL="error" +if [[ "${DEBUG:-}" == 1 ]]; then + GRIST_LOG_LEVEL="" +fi + docker run --name $DOCKER_CONTAINER --rm \ - --env VERBOSE=${VERBOSE:-} \ + --env VERBOSE=${DEBUG:-} \ -p $PORT:$PORT --env PORT=$PORT \ --env GRIST_SESSION_COOKIE=grist_test_cookie \ --env GRIST_TEST_LOGIN=1 \ - --env GRIST_LOG_LEVEL=error \ + --env GRIST_LOG_LEVEL=$GRIST_LOG_LEVEL \ + --env GRIST_LOG_SKIP_HTTP=${DEBUG:-false} \ --env TEST_SUPPORT_API_KEY=api_key_for_support \ ${TEST_IMAGE:-gristlabs/grist} &