From c6cd17e3b4f1fa036446a35e68340048182376ec Mon Sep 17 00:00:00 2001 From: Philipp Kohler <39829783+Snoup97@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:33:53 +0200 Subject: [PATCH] add workflow to execute unit tests (#118) --- .github/workflows/pytest-action.yml | 26 ++++++++++++++++++++++++++ requirements.txt | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pytest-action.yml diff --git a/.github/workflows/pytest-action.yml b/.github/workflows/pytest-action.yml new file mode 100644 index 0000000..82036db --- /dev/null +++ b/.github/workflows/pytest-action.yml @@ -0,0 +1,26 @@ +name: Pytest Execution + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10.11 + uses: actions/setup-python@v4 + with: + python-version: 3.10.11 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pytest diff --git a/requirements.txt b/requirements.txt index 526ee47..f3d00e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ black==23.3.0 openai==0.27.8 pre-commit==3.3.3 ruff==0.0.272 -typer==0.9.0 \ No newline at end of file +typer==0.9.0 +pytest==7.3.1 \ No newline at end of file