From 53106d17fd1ec5dbd9c6e23eeb5944c7e3375eeb Mon Sep 17 00:00:00 2001 From: Jason Montleon Date: Fri, 2 Feb 2024 11:45:39 -0500 Subject: [PATCH] Add kai-service requirements files Signed-off-by: Jason Montleon --- .github/workflows/test-kai-service.yml | 16 ++++++++++++++++ kai-service/Makefile | 2 +- kai-service/requirements.txt | 2 ++ kai-service/tests/requirements.txt | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 kai-service/requirements.txt create mode 100644 kai-service/tests/requirements.txt diff --git a/.github/workflows/test-kai-service.yml b/.github/workflows/test-kai-service.yml index cca909fd4..5660e00b0 100644 --- a/.github/workflows/test-kai-service.yml +++ b/.github/workflows/test-kai-service.yml @@ -2,10 +2,16 @@ name: Test Kai Service on: pull_request: paths: + - kai-service/Containerfile - kai-service/**.py + - kai-service/requirements.txt + - kai-service/tests/requirements.txt push: paths: + - kai-service/Containerfile - kai-service/**.py + - kai-service/requirements.txt + - kai-service/tests/requirements.txt workflow_dispatch: {} jobs: @@ -27,3 +33,13 @@ jobs: - name: Run test run: pushd kai-service && make test && popd + + - name: Build the Container + id: build-image + uses: redhat-actions/buildah-build@main + with: + image: kai-service + tags: latest + context: kai-service + containerfiles: | + ./kai-service/Containerfile diff --git a/kai-service/Makefile b/kai-service/Makefile index f9b4366f1..cf1402e53 100644 --- a/kai-service/Makefile +++ b/kai-service/Makefile @@ -1,4 +1,4 @@ deps: - pip install pytest pytest-aiohttp pyyaml + pip install -r tests/requirements.txt test: python3 -m pytest tests/kai_tests.py diff --git a/kai-service/requirements.txt b/kai-service/requirements.txt new file mode 100644 index 000000000..df84c65ab --- /dev/null +++ b/kai-service/requirements.txt @@ -0,0 +1,2 @@ +aiohttp +pyyaml diff --git a/kai-service/tests/requirements.txt b/kai-service/tests/requirements.txt new file mode 100644 index 000000000..4a9d5249c --- /dev/null +++ b/kai-service/tests/requirements.txt @@ -0,0 +1,3 @@ +-r ../requirements.txt +pytest +pytest-aiohttp