From c5480af3012aab44d8eab6ddb8cb54fce1cdc917 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci Date: Wed, 7 Feb 2024 20:44:52 +0100 Subject: [PATCH] try run docker container as a step in workflow (#349) --- .github/workflows/unstructured.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unstructured.yml b/.github/workflows/unstructured.yml index 6338b06e8..77ebb10ca 100644 --- a/.github/workflows/unstructured.yml +++ b/.github/workflows/unstructured.yml @@ -27,18 +27,23 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.8", "3.9", "3.10", "3.11"] - services: - unstructured-api: - image: "quay.io/unstructured-io/unstructured-api:latest" - ports: - - 8000:8000 - options: >- - --health-cmd "curl --fail http://localhost:8000/healthcheck || exit 1" - --health-interval 10s - --health-timeout 1s - --health-retries 10 steps: + - name: Free up disk space + run: | + sudo docker image prune --all --force + + - name: Run Unstructured API (docker) + run: | + docker run -d \ + --name unstructured-api \ + -p 8000:8000 \ + --health-cmd "curl --fail http://localhost:8000/healthcheck || exit 1" \ + --health-interval 10s \ + --health-timeout 1s \ + --health-retries 10 \ + quay.io/unstructured-io/unstructured-api:latest + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }}