From 2895560b300afa914c5afdbe3bff126beb904a11 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 23 Apr 2022 02:00:12 +0000 Subject: [PATCH] testing pytest/codecov --- .github/workflows/ci-tests.yml | 17 ++++++++--------- .gitignore | 2 ++ api/tacticalrmm/requirements-test.txt | 7 +++++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index d9d83031..94933376 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -42,9 +42,7 @@ jobs: cd api/tacticalrmm source ../env/bin/activate rm -f .coverage coverage.lcov - coverage run --concurrency=multiprocessing manage.py test -v 2 --parallel - coverage combine - coverage lcov + pytest if [ $? -ne 0 ]; then exit 1 fi @@ -58,9 +56,10 @@ jobs: exit 1 fi - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./api/tacticalrmm/coverage.lcov - base-path: ./api/tacticalrmm + - name: Run django tests + env: + GHACTIONS: "yes" + run: | + cd api/tacticalrmm + source ../env/bin/activate + codecov diff --git a/.gitignore b/.gitignore index ba7f1a8f..ad0ce099 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ nats-api.conf ignore/ coverage.lcov daphne.sock.lock +.pytest_cache +coverage.xml diff --git a/api/tacticalrmm/requirements-test.txt b/api/tacticalrmm/requirements-test.txt index 5e9ec8a7..2ee10c6c 100644 --- a/api/tacticalrmm/requirements-test.txt +++ b/api/tacticalrmm/requirements-test.txt @@ -1,5 +1,8 @@ coverage -coveralls model_bakery black -tblib \ No newline at end of file +pytest +pytest-django +pytest-xdist +pytest-cov +codecov \ No newline at end of file