diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b0c9d37c..f7dcf627 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -58,7 +58,7 @@ jobs: sudo apt-get update # sudo apt-get install gfortran swig libhdf5-serial-dev libmpich-dev sudo apt-get update - sudo apt install -y openmpi-bin libopenmpi-dev gfortran build-essential libblas3 libblas-dev liblapack3 liblapack-dev libatlas-base-dev texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super + sudo apt install -y openmpi-bin libopenmpi-dev gfortran build-essential libblas3 libblas-dev liblapack3 liblapack-dev libatlas-base-dev texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super python -m pip install --upgrade git+https://github.com/bitranox/wrapt_timeout_decorator.git python -m pip install pytest pytest-cov flake8 pytest-aiohttp sqlparse freezegun PyJWT joblib tensorflow afterglowpy coveralls python -m pip install . @@ -77,32 +77,12 @@ jobs: psql -U nmma -h localhost -c "GRANT ALL PRIVILEGES ON DATABASE nmma TO nmma;" nmma - name: Test with pytest run: | - pwd - ls - py.test nmma/tests/* + python -m coverage run --source nmma -m pytest nmma/tests/* env: LD_LIBRARY_PATH: .:/home/runner/work/nmma/nmma/MultiNest/lib # for Linux - - name: Combine and upload coverage + - name: Run Coveralls + if: ${{ success() }} run: | - python -m coverage combine - python -m coverage xml -i - python -m coveralls --service=github + coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_PARALLEL: true - - coverage: - needs: build - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Finish coverage collection - run: | - python -m pip install -U pip - python -m pip install -U coveralls - python -m coveralls --finish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}