From 829f5650a3521a5a058a3d72e1365082c09a7bc6 Mon Sep 17 00:00:00 2001 From: Ifeoluwa Ale <84350850+ifeoluwaale@users.noreply.github.com> Date: Sun, 24 Dec 2023 22:17:03 -0500 Subject: [PATCH] Github workflow for unit testing --- .github/workflows/run_tests.yml | 31 +++++++++++++++++++++++++++++++ 3.10-requirements.txt | 6 ++++++ 3.11-requirements.txt | 6 ++++++ 3.12-requirements.txt | 6 ++++++ 4 files changed, 49 insertions(+) create mode 100644 .github/workflows/run_tests.yml create mode 100644 3.10-requirements.txt create mode 100644 3.11-requirements.txt create mode 100644 3.12-requirements.txt diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..3874032 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,31 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] # Goal is to run tests for different python versions + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r ${{ matrix.python-version }}-requirements.txt + pip install pytest pytest-cov + - name: Run unit tests + run: | + pytest tests/unit --cov=dplpy + #- name: Run integ tests + # run: | + # pytest tests/integs -rA diff --git a/3.10-requirements.txt b/3.10-requirements.txt new file mode 100644 index 0000000..8f9c313 --- /dev/null +++ b/3.10-requirements.txt @@ -0,0 +1,6 @@ +numpy==1.22.4 +statsmodels==0.13.5 +matplotlib==3.8.0 +csaps==1.1.0 +pandas==2.0.0 +scipy==1.11.3 \ No newline at end of file diff --git a/3.11-requirements.txt b/3.11-requirements.txt new file mode 100644 index 0000000..ded02db --- /dev/null +++ b/3.11-requirements.txt @@ -0,0 +1,6 @@ +numpy==1.23.2 +statsmodels==0.13.5 +matplotlib==3.8.0 +csaps==1.1.0 +pandas==2.0.0 +scipy==1.11.3 \ No newline at end of file diff --git a/3.12-requirements.txt b/3.12-requirements.txt new file mode 100644 index 0000000..c7549b9 --- /dev/null +++ b/3.12-requirements.txt @@ -0,0 +1,6 @@ +numpy==1.26.0 +statsmodels==0.14.0 +matplotlib==3.8.0 +csaps==1.1.0 +pandas==2.0.0 +scipy==1.11.3 \ No newline at end of file