From 556fb62216881aed8f7c43f1ef1f5917b015b104 Mon Sep 17 00:00:00 2001 From: teobucci Date: Mon, 26 Feb 2024 14:37:11 +0100 Subject: [PATCH] Add test yaml --- .github/workflows/tests.yaml | 29 +++++++++++++++++++++++++++++ pyproject.toml | 4 ++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..607e0ae --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,29 @@ +name: Python Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8, 3.9, 3.10, 3.11] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[dev]" + - name: Run pytest + run: | + pytest diff --git a/pyproject.toml b/pyproject.toml index c1464b6..7a765e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,10 @@ docs = [ "jupyterlab", "nbconvert", ] +dev = [ + "pytest", + "pytest-cov", +] [tool.bumpver] current_version = "0.1.0"