File tree Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Original file line number Diff line number Diff line change @@ -185,3 +185,35 @@ jobs:
185185 himl simple/production --format yaml
186186 fi
187187 fi
188+
189+ docker :
190+ name : Docker build test
191+ runs-on : ubuntu-latest
192+ needs : [test, build]
193+ if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
194+ steps :
195+ - name : Checkout code
196+ uses : actions/checkout@v4
197+ with :
198+ fetch-depth : 0 # Needed for setuptools_scm
199+
200+ - name : Set up Docker Buildx
201+ uses : docker/setup-buildx-action@v3
202+
203+ - name : Build Docker image
204+ uses : docker/build-push-action@v6
205+ with :
206+ context : .
207+ push : false
208+ tags : himl:test
209+ cache-from : type=gha
210+ cache-to : type=gha,mode=max
211+
212+ - name : Test Docker image
213+ run : |
214+ # Test that both CLI commands work
215+ docker run --rm himl:test himl --help
216+ docker run --rm himl:test himl-config-merger --help
217+
218+ # Test basic functionality
219+ docker run --rm himl:test python -c "import himl; print('himl import successful')"
Original file line number Diff line number Diff line change @@ -2,9 +2,17 @@ FROM python:3.14-slim
22
33WORKDIR /config-merger
44
5- ADD . /config-merger/
5+ # Copy only the necessary files for installation
6+ COPY pyproject.toml ./
7+ COPY himl/ ./himl/
8+ COPY README.md ./
9+ COPY LICENSE ./
10+ COPY .git/ ./.git/
611
7- RUN apt-get update && apt-get install -y make curl
12+ RUN apt-get update && apt-get install -y make curl git && rm -rf /var/lib/apt/lists/*
813
9- RUN python -m pip install --upgrade pip && pip3 install -r requirements.txt && pip3 install .
10- RUN rm -rf /config-merger/*
14+ # Install the package with all optional dependencies for full functionality
15+ RUN python -m pip install --upgrade pip && pip3 install .[all]
16+
17+ # Clean up source files after installation (keep only installed package)
18+ RUN find /config-merger -mindepth 1 -delete
You can’t perform that action at this time.
0 commit comments