From 3a395bed8033180afa04d515e0b6f584ce3367a7 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Wed, 9 Feb 2022 09:42:44 +0100 Subject: [PATCH] Add pytest-xdist to run test in parallel Disable coverage because it's not compatible with parallel execution --- .github/workflows/flask.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index d94c15d8..cacc314c 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -50,7 +50,7 @@ jobs: pip install virtualenv virtualenv env source env/bin/activate - pip install flake8 pytest coverage + pip install flake8 pytest pytest-xdist pip install -r requirements.txt - name: Prepare database @@ -68,11 +68,4 @@ jobs: - name: Run Tests run: | source env/bin/activate - coverage run --source='ereuse_devicehub' env/bin/pytest -m mvp --maxfail=5 tests/ - coverage report --include='ereuse_devicehub/*' - coverage xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} + pytest -m mvp --maxfail=5 tests/ -n auto