pytest.yml: added testroutine pipeline
authorRobin Krens <robin@robinkrens.nl>
Thu, 15 Feb 2024 13:36:16 +0000 (14:36 +0100)
committerRobin Krens <robin@robinkrens.nl>
Thu, 15 Feb 2024 13:44:39 +0000 (14:44 +0100)
.github/workflows/pytest.yml [new file with mode: 0644]
tests/test_parse.py

diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
new file mode 100644 (file)
index 0000000..d3be369
--- /dev/null
@@ -0,0 +1,29 @@
+name: pytest
+
+on:
+  push:
+  pull_request:
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout code
+      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 -r requirements.txt
+        pip install -e .
+
+    - name: Run pytest
+      run: |
+        pytest
+
index 1cf8272..b18673d 100644 (file)
@@ -1,4 +1,4 @@
-from src.RAPacker import calc_sum, unpack_pkt, pack_pkt
+from raflash.RAPacker import calc_sum, unpack_pkt, pack_pkt
 import pytest
 
 def test_calc_sum():