diff --git a/.github/workflows/main_ci.yaml b/.github/workflows/main_ci.yaml index 88cbc997..4d4dfd64 100644 --- a/.github/workflows/main_ci.yaml +++ b/.github/workflows/main_ci.yaml @@ -54,3 +54,22 @@ jobs: env: WORKSPACE_DIR: ${{ github.workspace }} run: bazel test //pipeline-ui:unit_test --test_output=all + + smoke-tests: + runs-on: ubuntu-latest + needs: [pipeline-service-validation, pipeline-ui-validation] + steps: + - uses: actions/checkout@v4 + + - name: Start containers + run: | + docker compose --env-file .env.local up -d --build --wait + + # TODO: include the happy trivial paths from e2e specs here + - name: Check pipeline service's health + run: | + curl -f http://localhost:8080/actuator/health || exit 1 + + - name: Check pipeline ui's health + run: | + curl -fsS --retry 10 --retry-connrefused --retry-delay 1 --max-time 5 -o /dev/null http://localhost:3000/ diff --git a/docker-compose.yml b/docker-compose.yml index ae88a3d8..f5d88041 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json + volumes: mysql_data: pipeline_scripts: @@ -84,6 +86,13 @@ services: FEATURE_PROVIDER_URI: http://flagd:8016 ports: - "8080:8080" + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8080/actuator/health || exit 1"] + interval: 15s + timeout: 5s + retries: 3 + start_period: 30s + volumes: - pipeline_scripts:/app/pipeline_scripts - pipeline_build_logs:/app/pipeline_build_logs @@ -113,4 +122,4 @@ services: - app depends_on: pipeline-app: - condition: service_started + condition: service_healthy