Skip to content

test: add GitHub Actions workflow for Docker integration tests #6

test: add GitHub Actions workflow for Docker integration tests

test: add GitHub Actions workflow for Docker integration tests #6

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: "Docker Integration Tests"
on:
pull_request:
push:
branches:
- main
jobs:
docker-integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build runtime image
uses: docker/build-push-action@v5
with:
context: .
target: runtime
tags: aiperf:test
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build env-builder stage (for uv)
uses: docker/build-push-action@v5
with:
context: .
target: env-builder
tags: aiperf:env-builder
load: true
cache-from: type=gha
- name: Copy uv from env-builder to host
run: |
docker create --name uv-container aiperf:env-builder
docker cp uv-container:/bin/uv ./uv
docker rm uv-container
chmod +x ./uv
- name: Fix workspace permissions for container user
run: |
# Make workspace writable by container user (UID 1000)
sudo chown -R 1000:1000 ${{ github.workspace }}
- name: Run integration tests in container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-v ${{ github.workspace }}/uv:/usr/local/bin/uv:ro \
-w /workspace \
aiperf:test \
"uv pip install pytest pytest-xdist pytest-asyncio pytest-cov && \
uv pip install -e 'tests/aiperf_mock_server[dev]' && \
/opt/aiperf/venv/bin/pytest tests/integration/ -m 'integration and not performance and not stress' -n auto -v --tb=long"