From 4bd60b21ea5479f589736a1c75d4df27ebae9701 Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Fri, 29 Sep 2023 20:56:38 +0200 Subject: [PATCH] Add github action for pytest --- .github/workflows/pytest.yml | 25 +++++++++++++++++++++++++ api/Pipfile | 1 + api/Pipfile.lock | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..f82b92d --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,25 @@ +name: Run pytest + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + - name: Install dependencies + run: | + cd api + python -m pip install --upgrade pip + pip install pipenv + pipenv install --dev + - name: Test with pytest + run: | + cd api + pipenv run pytest diff --git a/api/Pipfile b/api/Pipfile index a1c6c74..aaae373 100644 --- a/api/Pipfile +++ b/api/Pipfile @@ -27,6 +27,7 @@ sqlalchemy = "*" mysql-connector-python = "*" [dev-packages] +pytest = "*" [requires] python_version = "3.11" diff --git a/api/Pipfile.lock b/api/Pipfile.lock index 930c2d4..3df309f 100644 --- a/api/Pipfile.lock +++ b/api/Pipfile.lock @@ -1034,5 +1034,39 @@ "version": "==1.9.2" } }, - "develop": {} + "develop": { + "iniconfig": { + "hashes": [ + "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", + "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" + ], + "markers": "python_version >= '3.7'", + "version": "==2.0.0" + }, + "packaging": { + "hashes": [ + "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61", + "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f" + ], + "markers": "python_version >= '3.7'", + "version": "==23.1" + }, + "pluggy": { + "hashes": [ + "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12", + "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7" + ], + "markers": "python_version >= '3.8'", + "version": "==1.3.0" + }, + "pytest": { + "hashes": [ + "sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002", + "sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==7.4.2" + } + } }