Parallelize tests with pytest-xdist #244
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: codecoverage | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
env: | |
PYTHON: '3.9' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "Install codecov" | |
run: pip install pytest-cov | |
- name: "Build" | |
run: pip install .[tests] | |
- name: Generate coverage report | |
run: | | |
git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata | |
pytest -n auto tests --disable-warnings --cov-report=xml:fmu-tools.xml; | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: fmu-tools.xml |