Spaces:
Running
Running
File size: 2,223 Bytes
d202ada |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
name: Test Docker images
on:
push:
branches: [main]
paths:
- "docker/**"
- "poetry.lock"
- "pyproject.toml"
- "src/backend/**"
- ".github/workflows/docker_test.yml"
pull_request:
branches: [dev]
paths:
- "docker/**"
- "poetry.lock"
- "pyproject.toml"
- "src/**"
- ".github/workflows/docker_test.yml"
env:
POETRY_VERSION: "1.8.2"
jobs:
test-docker:
runs-on: ubuntu-latest
name: Test docker images
steps:
- uses: actions/checkout@v4
- name: Build image
run: |
docker build -t langflowai/langflow:latest-dev \
-f docker/build_and_push.Dockerfile \
.
- name: Test image
run: |
expected_version=$(cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
version=$(docker run --rm --entrypoint bash langflowai/langflow:latest-dev -c "python -c 'from langflow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
if [ "$expected_version" != "$version" ]; then
echo "Expected version: $expected_version"
echo "Actual version: $version"
exit 1
fi
- name: Build backend image
run: |
docker build -t langflowai/langflow-backend:latest-dev \
--build-arg LANGFLOW_IMAGE=langflowai/langflow:latest-dev \
-f docker/build_and_push_backend.Dockerfile \
.
- name: Test backend image
run: |
expected_version=$(cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
version=$(docker run --rm --entrypoint bash langflowai/langflow-backend:latest-dev -c "python -c 'from langflow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
if [ "$expected_version" != "$version" ]; then
echo "Expected version: $expected_version"
echo "Actual version: $version"
exit 1
fi
- name: Build frontend image
run: |
docker build -t langflowai/langflow-frontend:latest-dev \
-f docker/frontend/build_and_push_frontend.Dockerfile \
.
|