Skip to content

Commit

Permalink
fix(tests): various mistakes in workflow script
Browse files Browse the repository at this point in the history
Squash commit for:

- fix: mistakes in workflow script
- fix: added openpyxl requirement needed for testing
- fix: update file path in unit test workflow
- add: files needed for tests
- fix: update file path in unit test workflow
- fix: update file path in unit test workflow
- fix: path update in unit test workflow
  • Loading branch information
f-aguzzi committed May 6, 2024
1 parent 9311da4 commit 3d63d37
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ scipy>=1.12.0
matplotlib>=3.8.2
pandas>=2.2.1
seaborn>=0.13.2
openpyxl>=3.1.2
Binary file added src/tests/qepas.xlsx
Binary file not shown.
Binary file added src/tests/rt.xlsx
Binary file not shown.

0 comments on commit 3d63d37

Please sign in to comment.