Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI Integration test and unit test #58

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ on: pull_request

jobs:
build:

runs-on: ubuntu-latest
name: Unit Tests on python${{ matrix.python }} via ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
python: "3.10"
steps:
- uses: actions/checkout@v4
- name: Setup Python
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:focal
FROM ubuntu:jammy
ENV DEBIAN_FRONTEND=noninteractive
ENV VENV=${VENV:-"venv"}
RUN apt-get update && \
apt-get install -y \
git \
Expand All @@ -21,7 +22,8 @@ RUN apt-get update && \
COPY .teuthology.yaml /root
WORKDIR /teuthology_api
COPY . /teuthology_api/
RUN pip3 install -e .
RUN python3 -m venv ${VENV}
RUN /teuthology_api/${VENV}/bin/pip3 install -e .
RUN mkdir /archive_dir/

CMD sh /teuthology_api/start_container.sh
ENTRYPOINT /teuthology_api/start_container.sh
5 changes: 3 additions & 2 deletions start_container.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env sh
#!/usr/bin/bash
set -ex
trap exit TERM

HOST=${TEUTHOLOGY_API_SERVER_HOST:-"0.0.0.0"}
PORT=${TEUTHOLOGY_API_SERVER_PORT:-"8082"}
VENV=${VENV:-"venv"}


source ${VENV}/bin/activate
cd /teuthology_api/src/

if [ "$DEPLOYMENT" = "development" ]; then
Expand Down
Loading