diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index ed8d9b9..32c317e 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -14,14 +14,14 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Analysing the code with pylint - run: python -m unittest src/tests/*.py + python3 -m pip install --upgrade pip + pip3 install -r requirements.txt + - name: Run unit tests on the code + run: python3 -m unittest ${GITHUB_WORKSPACE}/src/tests/*.py - name: Check test results run: | - test_result=$(python3 -m unittest src/tests/*.py |& grep "FAILED" | wc -w) - if (( $(echo "$result") == 0 )); then + test_result=$(python3 -m unittest ${GITHUB_WORKSPACE}/src/tests/*.py |& grep "FAILED" | wc -w) + if (( $(echo "$test_result") == 0 )); then echo "Tests passed. Commit approved." else echo "Tests failed. Blocking commit." diff --git a/requirements.txt b/requirements.txt index 1624e6a..a460a71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ scipy>=1.12.0 matplotlib>=3.8.2 pandas>=2.2.1 seaborn>=0.13.2 +openpyxl>=3.1.2 diff --git a/src/tests/qepas.xlsx b/src/tests/qepas.xlsx new file mode 100644 index 0000000..c9e4bf2 Binary files /dev/null and b/src/tests/qepas.xlsx differ diff --git a/src/tests/rt.xlsx b/src/tests/rt.xlsx new file mode 100644 index 0000000..4f76853 Binary files /dev/null and b/src/tests/rt.xlsx differ