From 840923b62cfedc2d89de330b96b430f92a78e48c Mon Sep 17 00:00:00 2001 From: Cyrille Derche Date: Fri, 13 Sep 2024 18:27:55 +0200 Subject: [PATCH] github workflow tests --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ requirements.txt | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e5cb0b8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +--- + +name: CI Pipeline + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index d30f6fb..b4cd9da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,8 @@ fastapi[standard]==0.114.1 pydantic==2.8.0 transformers[torch]==4.44.2 + +# Test pytest==8.3.3 +pytest-cov==5.0.0 httpx==0.27.2 \ No newline at end of file