From a45a39bef57987f10a1d84a72164896362cddb9b Mon Sep 17 00:00:00 2001 From: bastienlc <78959054+bastienlc@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:15:51 +0100 Subject: [PATCH] Add test workflow --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 3 +++ tests/__init__.py | 0 3 files changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 tests/__init__.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6b4ba82 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Test 🧪 + +on: + pull_request: + push: + branches: + - dev + - master + +jobs: + test: + name: Run tests 🧪 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install dependencies + run: | + pip install -r requirements.txt + sudo apt-get install -y poppler-utils + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest --cov=src --cov-report=xml --cov-report=html \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d7dcee7..bb42d33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,3 +31,6 @@ local_scheme = "no-local-version" [tool.setuptools.dynamic] dependencies = { file = ["requirements.txt"] } + +[tool.pytest.ini_options] +pythonpath = "src" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29