1
0
mirror of synced 2026-01-04 09:04:47 -05:00
Files
airbyte/tools/bin/e2e_test.sh
Davin Chia fd0b7699a4 Add JUnit Test Reports to build outputs. (#15271)
It's difficult today to parse all the logs from tests. Engineers waste time scrolling through the log outputs and looking for the relevant stack trace.

This PR adds an action to generate a JUnit report so devs can understand test results at a glance. This generates 3 reports for each of the main build jobs when the build completes. We leave the frontend build out since this is aggregated by cypress.

See https://github.com/airbytehq/airbyte/pull/15271/checks?check_run_id=7683783016 for an example of how this works.

Use the https://github.com/dorny/test-reporter action and configure this to look at the Jacoco test report output for top level and second level builds. Note that most of the parameters into the action don't work.

Comment out the trap commands to output logs. Though this can be useful for debugging, there is little practical use in the day-to-day, and results in extremely noisy logs.
2022-08-08 17:04:36 -07:00

32 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
. tools/lib/lib.sh
assert_root
echo "Starting app..."
# todo (cgardens) - docker-compose 1.27.3 contained a bug that causes a failure if the volume path
# does not exist when the volume is created. It was fixed in 1.27.4. Github actions virtual envs,
# however, new ubuntu release upgraded to 1.27.3 on 09/24/20. Once github actions virtual envs
# upgrades to 1.27.4, we can stop manually making the directory.
mkdir -p /tmp/airbyte_local
# Detach so we can run subsequent commands
VERSION=dev TRACKING_STRATEGY=logging docker-compose up -d
# Uncomment for debugging. Warning, this is verbose.
# trap 'echo "docker-compose logs:" && docker-compose logs -t --tail 1000 && docker-compose down && docker stop airbyte_ci_pg' EXIT
docker run --rm -d -p 5433:5432 -e POSTGRES_PASSWORD=secret_password -e POSTGRES_DB=airbyte_ci --name airbyte_ci_pg postgres
echo "Waiting for health API to be available..."
# Retry loading the health API of the server to check that the server is fully available
until $(curl --output /dev/null --fail --silent --max-time 5 --head localhost:8001/api/v1/health); do
echo "Health API not available yet. Retrying in 10 seconds..."
sleep 10
done
echo "Running e2e tests via gradle"
SUB_BUILD=PLATFORM ./gradlew --no-daemon :airbyte-webapp-e2e-tests:e2etest -PcypressWebappKey=$CYPRESS_WEBAPP_KEY