Add pytest-xdist to run test in parallel

Disable coverage because it's not compatible with parallel execution
This commit is contained in:
Santiago L 2022-02-09 09:42:44 +01:00
parent 01b85661b9
commit 3a395bed80
1 changed files with 2 additions and 9 deletions

View File

@ -50,7 +50,7 @@ jobs:
pip install virtualenv pip install virtualenv
virtualenv env virtualenv env
source env/bin/activate source env/bin/activate
pip install flake8 pytest coverage pip install flake8 pytest pytest-xdist
pip install -r requirements.txt pip install -r requirements.txt
- name: Prepare database - name: Prepare database
@ -68,11 +68,4 @@ jobs:
- name: Run Tests - name: Run Tests
run: | run: |
source env/bin/activate source env/bin/activate
coverage run --source='ereuse_devicehub' env/bin/pytest -m mvp --maxfail=5 tests/ pytest -m mvp --maxfail=5 tests/ -n auto
coverage report --include='ereuse_devicehub/*'
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}