Skip to content

Commit

Permalink
Merge pull request #192 from sahiljhawar/add_coveralls
Browse files Browse the repository at this point in the history
This PR adds support for coveralls.
  • Loading branch information
mcoughlin authored Aug 6, 2023
2 parents 782d8ab + dd7354a commit e6a1f58
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ 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
python -m pip install pytest pytest-cov flake8 pytest-aiohttp sqlparse freezegun PyJWT joblib tensorflow afterglowpy coveralls
python -m pip install .
git clone https://github.com/JohannesBuchner/MultiNest && cd MultiNest/build && cmake .. && make && cd ../..
pwd
Expand All @@ -82,5 +82,27 @@ jobs:
py.test nmma/tests/*
env:
LD_LIBRARY_PATH: .:/home/runner/work/nmma/nmma/MultiNest/lib # for Linux
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Combine and upload coverage
run: |
python -m coverage combine
python -m coverage xml -i
python -m 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 }}

0 comments on commit e6a1f58

Please sign in to comment.