Repository: Rishit-dagli/Conformer (language: python)

Issue:
Add PyTest to dev dependencies



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index 3bfabfc..c1281bc 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -22,11 +22,14 @@ jobs:
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
-        python-version: '3.x'
+        python-version: '3.9'
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install build
+        pip install build tensorflow einops pytest parameterized
+    - name: Run Tests
+      run: |
+        pytest --verbose
     - name: Build package
       run: python -m build
     - name: Publish package
diff --git a/README.md b/README.md
index ab08e27..21673c5 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,12 @@ cd Conformer
 pip install -e .[dev]
 ```
 
+To run rank and shape tests run the following:
+
+```sh
+pytest --verbose
+```
+
 ## Usage
 
 In this section, I show a minimal example of creating a Convolutional Module, one of the main contributions of the paper and a Conformer block as well.
diff --git a/setup.py b/setup.py
index 877e288..260b465 100644
--- a/setup.py
+++ b/setup.py
@@ -61,6 +61,8 @@ def get_version(rel_path: str) -> str:
             "twine",
             "numpy",
             "black",
+            "pytest",
+            "parameterized",
         ],
     },
 )


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..1e9a82a
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,25 @@
+name: Run Tests
+
+on:
+  push:
+  pull_request:
+    branches: [master]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python
+      uses: actions/setup-python@v2
+      with:
+        python-version: '3.9'
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install build tensorflow einops pytest parameterized
+    - name: Run Tests
+      run: |
+        pytest --verbose
\ No newline at end of file