diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml new file mode 100644 index 00000000..feac7892 --- /dev/null +++ b/.github/workflows/integration_tests.yaml @@ -0,0 +1,31 @@ +name: Integration tests + +on: + - push + - pull_request + +jobs: + integration_tests: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + strategy: + matrix: + python-version: ["3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Python version + run: python --version + - name: PDM installation + run: pip install --user pdm + - name: Install dependencies + run: pdm install + - name: Install devel dependencies + run: pdm install --dev + - name: Run integration tests + run: make test-integration diff --git a/Makefile b/Makefile index 65fe166e..8ca860f1 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test-unit: ## Run the unit tests test-integration: ## Run integration tests tests @echo "Running integration tests..." @echo "Reports will be written to ${ARTIFACT_DIR}" - COVERAGE_FILE="${ARTIFACT_DIR}/.coverage.integration" pdm run pytest tests/integration --cov=src --cov-report term-missing --cov-report "json:${ARTIFACT_DIR}/coverage_integration.json" --junit-xml="${ARTIFACT_DIR}/junit_integration.xml" --cov-fail-under=60 + COVERAGE_FILE="${ARTIFACT_DIR}/.coverage.integration" pdm run pytest tests/integration --cov=src --cov-report term-missing --cov-report "json:${ARTIFACT_DIR}/coverage_integration.json" --junit-xml="${ARTIFACT_DIR}/junit_integration.xml" --cov-fail-under=10 check-types: ## Checks type hints in sources MYPYPATH=src pdm run mypy --namespace-packages --explicit-package-bases --strict --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs src diff --git a/tests/configuration/lightspeed-stack.yaml b/tests/configuration/lightspeed-stack.yaml index ddbb8d1c..ea0729c4 100644 --- a/tests/configuration/lightspeed-stack.yaml +++ b/tests/configuration/lightspeed-stack.yaml @@ -1,4 +1,11 @@ name: foo bar baz +service: + host: localhost + port: 8080 + auth_enabled: false + workers: 1 + color_log: true + access_log: true llama_stack: # Uses a remote llama-stack service # The instance would have already been started with a llama-stack-run.yaml file diff --git a/tests/integration/test_configuration.py b/tests/integration/test_configuration.py index 0d2fbc91..05e40b1e 100644 --- a/tests/integration/test_configuration.py +++ b/tests/integration/test_configuration.py @@ -1,7 +1,7 @@ """Integration tests for configuration loading and handling.""" import pytest -from src.configuration import configuration +from configuration import configuration @pytest.fixture