Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
65b0d8a
feat(tests): add integration tests using Testcontainers
ilopezluna Oct 30, 2025
7fdcd28
Merge branch 'main' into add-testcontainers
ilopezluna Oct 31, 2025
189b64a
feat(tests): enhance integration tests for model pulling with various…
ilopezluna Oct 31, 2025
1922d93
refactor(tests): comment out tests requiring default OCI registry ove…
ilopezluna Oct 31, 2025
72cef1d
Merge branch 'refs/heads/main' into add-testcontainers
ilopezluna Nov 3, 2025
cda1cfb
fix(tests): update OCI registry version and add environment variables…
ilopezluna Nov 3, 2025
090ba16
Adds test case of pulling models with digest
ilopezluna Nov 3, 2025
e85c72d
Adds test case of pulling models with digest
ilopezluna Nov 3, 2025
3221a8b
Use a separate workflow for now
ilopezluna Nov 3, 2025
594dc68
fix(index): handle digest references in tag function
ilopezluna Nov 3, 2025
5ce4125
add tests for inspect command
ilopezluna Nov 3, 2025
fc35bcc
add integration tests for model reference formats
ilopezluna Nov 3, 2025
3dc6dc0
fix(inspect): enhance model ID expansion logic to exclude tagged and …
ilopezluna Nov 3, 2025
9ba8c87
Merge branch 'main' into add-testcontainers
ilopezluna Nov 3, 2025
dc3c86c
Temporary add trigger on push to let Github know about this workflow
ilopezluna Nov 3, 2025
8ef78a3
tests: build docker/model-runner locally
doringeman Nov 4, 2025
5f42d70
tests: only run "^TestIntegration"
doringeman Nov 4, 2025
080bb68
tests: add check for invalid tests
doringeman Nov 4, 2025
61324ba
tests: always pull the image if it's not build locally
doringeman Nov 4, 2025
2b73996
ci: simplify integration test workflow to use Makefile
doringeman Nov 4, 2025
46d041c
fix(test): bring back build tag to exclude integration tests from uni…
doringeman Nov 4, 2025
70ff06b
chore: use tc module for the registry
ilopezluna Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Integration Tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding this additional workflow because I have to build the DMR image before running tests. This temporary, integration test should be run in the normal CI workflow


on:
workflow_dispatch: # Manual trigger only
push:

jobs:
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
with:
go-version: 1.24.2
cache: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435

- name: Run integration tests
run: make integration-tests
Comment on lines +9 to +26

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 8 days ago

To fix the problem, explicitly define a permissions block with the least privilege needed. Since this workflow job (integration-test) only checks out code and runs tests but does not perform any write operations, the minimal permission needed is contents: read. The best approach is to add:

permissions:
  contents: read

This block can be added at the workflow root (applies to all jobs), or more specifically, to the integration-test job (since there’s only one job here, either location is functionally the same). Place the block above or within the relevant job definition.

To implement this, add permissions: contents: read just below runs-on: ubuntu-latest and above timeout-minutes: 10 (line 9 in the snippet). No other changes or dependency modifications are necessary.


Suggested changeset 1
.github/workflows/integration-test.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -7,6 +7,8 @@
 jobs:
   integration-test:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     timeout-minutes: 10
 
     steps:
EOF
@@ -7,6 +7,8 @@
jobs:
integration-test:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10

steps:
Copilot is powered by AI and may make mistakes. Always verify output.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ SOURCE ?=
TAG ?=
LICENSE ?=

# Test configuration
BUILD_DMR ?= 1

# Main targets
.PHONY: build run clean test docker-build docker-build-multiplatform docker-run docker-build-vllm docker-run-vllm docker-run-impl help validate model-distribution-tool
.PHONY: build run clean test integration-tests docker-build docker-build-multiplatform docker-run docker-build-vllm docker-run-vllm docker-run-impl help validate model-distribution-tool
# Default target
.DEFAULT_GOAL := build

Expand Down Expand Up @@ -60,6 +63,19 @@ clean:
test:
go test -v ./...

integration-tests:
@echo "Running integration tests..."
@echo "Note: This requires Docker to be running"
@echo "Checking test naming conventions..."
@INVALID_TESTS=$$(grep "^func Test" cmd/cli/commands/integration_test.go | grep -v "^func TestIntegration"); \
if [ -n "$$INVALID_TESTS" ]; then \
echo "Error: Found test functions that don't start with 'TestIntegration':"; \
echo "$$INVALID_TESTS" | sed 's/func \([^(]*\).*/\1/'; \
exit 1; \
fi
@BUILD_DMR=$(BUILD_DMR) go test -v -race -count=1 -tags=integration -run "^TestIntegration" -timeout=5m ./cmd/cli/commands
@echo "Integration tests completed!"

validate:
find . -type f -name "*.sh" | xargs shellcheck

Expand Down
Loading
Loading