Skip to content

Commit 0405417

Browse files
authored
Merge pull request #63 from tisnik/github-action-to-run-integration-tests
LCORE-161: GitHub action to run integration tests
2 parents e653b51 + dd57d45 commit 0405417

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Integration tests
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
integration_tests:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
strategy:
14+
matrix:
15+
python-version: ["3.11", "3.12", "3.13"]
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Python version
23+
run: python --version
24+
- name: PDM installation
25+
run: pip install --user pdm
26+
- name: Install dependencies
27+
run: pdm install
28+
- name: Install devel dependencies
29+
run: pdm install --dev
30+
- name: Run integration tests
31+
run: make test-integration

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test-unit: ## Run the unit tests
1313
test-integration: ## Run integration tests tests
1414
@echo "Running integration tests..."
1515
@echo "Reports will be written to ${ARTIFACT_DIR}"
16-
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
16+
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
1717

1818
check-types: ## Checks type hints in sources
1919
MYPYPATH=src pdm run mypy --namespace-packages --explicit-package-bases --strict --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs src

tests/configuration/lightspeed-stack.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
name: foo bar baz
2+
service:
3+
host: localhost
4+
port: 8080
5+
auth_enabled: false
6+
workers: 1
7+
color_log: true
8+
access_log: true
29
llama_stack:
310
# Uses a remote llama-stack service
411
# The instance would have already been started with a llama-stack-run.yaml file

tests/integration/test_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Integration tests for configuration loading and handling."""
22

33
import pytest
4-
from src.configuration import configuration
4+
from configuration import configuration
55

66

77
@pytest.fixture

0 commit comments

Comments
 (0)