From 56d5a758ef570340d2b03f33e96533172b2344ae Mon Sep 17 00:00:00 2001 From: Andrew Aikman Date: Wed, 24 Jan 2024 21:09:19 +0000 Subject: [PATCH] feat: CI test runner (#8) --- .github/workflows/test.yml | 20 ++++++++++++++++++++ conftest.py | 0 requirements.txt | 12 ++++++++++++ shedpi_hub_dashboard/tests/__init__.py | 0 shedpi_hub_dashboard/tests/test_runs.py | 2 ++ 5 files changed, 34 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 conftest.py create mode 100644 shedpi_hub_dashboard/tests/__init__.py create mode 100644 shedpi_hub_dashboard/tests/test_runs.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..dccab1d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test +on: + push: + branches-ignore: + - "release/**" + +jobs: + build-and-test: + name: Test code + runs-on: ubuntu-latest + + steps: + - name: Check out repo + uses: actions/checkout@v3 + + - name: Install packages + run: pip install -r requirements.txt + + - name: Run tests + run: pytest diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt index 428d509..d1eff23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,21 @@ asgiref==3.7.2 build==0.10.0 +cfgv==3.4.0 +distlib==0.3.8 Django==5.0.1 +filelock==3.13.1 +identify==2.5.33 +iniconfig==2.0.0 +nodeenv==1.8.0 packaging==23.1 +platformdirs==4.1.0 +pluggy==1.4.0 +pre-commit==3.6.0 pyproject_hooks==1.0.0 +pytest==7.4.4 +PyYAML==6.0.1 setuptools-scm==7.1.0 sqlparse==0.4.4 tomli==2.0.1 typing_extensions==4.7.1 +virtualenv==20.25.0 diff --git a/shedpi_hub_dashboard/tests/__init__.py b/shedpi_hub_dashboard/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shedpi_hub_dashboard/tests/test_runs.py b/shedpi_hub_dashboard/tests/test_runs.py new file mode 100644 index 0000000..18695f0 --- /dev/null +++ b/shedpi_hub_dashboard/tests/test_runs.py @@ -0,0 +1,2 @@ +def test_runs(): + assert True