Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Miryam-Schwartz committed Dec 8, 2024
1 parent c2d2e10 commit 654d4f7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ufm_log_analyzer_ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,26 @@ jobs:
pip install ruff==0.7.3
ruff format --diff --check src/loganalyze
pytest:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Run Pytest
run: |
SCRIPT_DIR="plugins/ufm_log_analyzer_plugin"
# Set PYTHONPATH to include src directory and two levels up for utils
PYTHONPATH="$(realpath $SCRIPT_DIR/src):$(realpath $SCRIPT_DIR/../../)"
export PYTHONPATH
cd $SCRIPT_DIR
pytest --maxfail=1 --disable-warnings -q # Runs pytest with limited output
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def test_succeed():
assert 2 + 2 == 4 # This will pass

def test_fail():
assert 2 + 2 == 5 # This will fail

0 comments on commit 654d4f7

Please sign in to comment.