From 84db3505244cd6a126e1b7400a1cd2aa53268917 Mon Sep 17 00:00:00 2001 From: Dinis Cruz Date: Mon, 30 Dec 2024 00:19:18 +0000 Subject: [PATCH] using pytest to run the tests --- .github/actions/run-tests/action.yml | 18 +++++++----------- requirements-test.txt | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 197ad35..8ec25ff 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -1,21 +1,17 @@ name: "run-tests" description: "run-tests" + runs: using: "composite" steps: - name: Install Dependencies - uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/poetry__install@dev - with: - pip_install: '-r requirements-test.txt' + shell: bash + run: | + pip install -r requirements-test.txt - name: Run Unit Tests (Unit) - uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/poetry__run-unit-tests@dev - with: - test_target: 'tests/unit' - - - name: Run Unit Tests (Integration) - uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/poetry__run-unit-tests@dev - with: - test_target: 'tests/integration' \ No newline at end of file + shell: bash + run: | + coverage run --source=mgraph_ai -m pytest -v -s --durations=0 tests/unit \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt index bef43bd..196ef21 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ # for testing +osbot-utils pytest pytest-cov \ No newline at end of file