Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

Tests UI (#361)

patcher97e4a3b0a16fc
diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml
index 011b7903..3a6c7606 100644
--- a/.github/workflows/ui-test.yml
+++ b/.github/workflows/ui-test.yml
@@ -1,17 +1,17 @@
-name: Build and Run Docker Image
+name: Test OpenLIT UI
on:
- push:
- branches: [ "main" ]
- paths:
- - 'src/**'
- pull_request_target:
- branches: [ "main" ]
- paths:
- - 'src/**'
- workflow_dispatch:
- schedule:
- - cron: '0 0 1-31/15 * *'
+ push:
+ branches: [main]
+ paths:
+ - 'src/**'
+ pull_request_target:
+ branches: [main]
+ paths:
+ - 'src/**'
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 1-31/15 * *'
jobs:
build-and-run:
@@ -19,21 +19,31 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Start Docker Compose
- run: docker-compose -f dev-docker-compose.yml up --build -d
+ run: docker compose -f src/dev-docker-compose.yml up --build -d
- - name: Check Docker container exit status
+ - name: Wait for services to be healthy
run: |
- if [ "$(docker inspect -f '{{.State.Running}}' openlit)" == "false" ]; then
- echo "OpenLIT container failed to run."
- exit 1
- fi
+ echo "Waiting for services to be healthy..."
+ while [ "$(docker inspect --format='{{.State.Health.Status}}' openlit)" != "healthy" ]; do
+ if [ "$(docker inspect --format='{{.State.Health.Status}}' openlit)" == "unhealthy" ]; then
+ echo "Service is unhealthy, exiting..."
+ exit 1
+ fi
+ sleep 5
+ done
- name: Post Docker logs in case of failure
if: failure()
- run: docker logs openlit
\ No newline at end of file
+ run: docker logs openlit
+
+ - name: Clean up Docker
+ if: always()
+ run: docker compose -f dev-docker-compose.yml down
\ No newline at end of file
diff --git a/README.md b/README.md
index 2a3cd81f..a4622701 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ flowchart TB;
2. Start Docker Compose
```shell
- docker-compose up -d
+ docker compose up -d
```
### Step 2: Install OpenLIT SDK
diff --git a/docs/latest/installation.mdx b/docs/latest/installation.mdx
index bfd9ed19..b7703518 100644
--- a/docs/latest/installation.mdx
+++ b/docs/latest/installation.mdx
@@ -54,7 +54,7 @@ For a quick and straightforward setup, Docker Compose can be used to deploy Open
<Step title="Start Docker Compose">
From the root directory of the OpenLIT Repo, Run the below command
```shell
- docker-compose up -d
+ docker compose up -d
```
</Step>
</Steps>
diff --git a/docs/latest/quickstart.mdx b/docs/latest/quickstart.mdx
index 32e4c0ec..d09e9ef8 100644
--- a/docs/latest/quickstart.mdx
+++ b/docs/latest/quickstart.mdx
@@ -34,7 +34,7 @@ flowchart TB;
<Step title="Start Docker Compose">
From the root directory of the [OpenLIT Repo](https://github.com/openlit/openlit), Run the below command:
```shell
- docker-compose up -d
+ docker compose up -d
```
</Step>
</Steps>
diff --git a/src/README.md b/src/README.md
index afa6ce08..bf82211a 100644
--- a/src/README.md
+++ b/src/README.md
@@ -11,7 +11,7 @@ To run the development environment, follow these steps:
3. Use the following Docker Compose command to build and start the containers as specified in the `dev-docker-compose.yml` file:
```
- docker-compose -f dev-docker-compose.yml up --build -d
+ docker compose -f dev-docker-compose.yml up --build -d
```
The `--build` flag ensures that Docker builds images for our services (if needed) before starting the containers.
@@ -21,7 +21,7 @@ To run the development environment, follow these steps:
5. To stop the services and remove the containers, you can use the following command:
```
- docker-compose -f dev-docker-compose.yml down
+ docker compose -f dev-docker-compose.yml down
```
-This command stops all running containers and removes them along with their networks. It's a clean way to shut down your development environment.
+This command stops all running containers and removes them along with their networks. It's a clean way to shut down your development environment.
\ No newline at end of file