Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2b6cd15

Browse files
Merge pull request #36 from jacobwilliams/codecov
code coverage
2 parents 9b57111 + 7df9567 commit 2b6cd15

File tree

3 files changed

+42
-14
lines changed

3 files changed

+42
-14
lines changed

‎.github/workflows/CI.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest]
11-
gcc_v: [9] # Version of GFortran we want to use.
12-
python-version: [3.7]
11+
gcc_v: [10] # Version of GFortran we want to use.
12+
python-version: [3.9]
1313
env:
1414
FC: gfortran-${{ matrix.gcc_v }}
1515
GCC_V: ${{ matrix.gcc_v }}
@@ -43,18 +43,31 @@ jobs:
4343
- name: Install GFortran Linux
4444
if: contains( matrix.os, 'ubuntu')
4545
run: |
46-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
47-
sudo apt-get update
48-
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V}
49-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
50-
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
51-
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
46+
sudo apt-get install lcov
47+
sudo update-alternatives \
48+
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
49+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
50+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }}
5251
53-
- name: Compile
54-
run: fpm build --profile release
52+
#- name: Compile
53+
# run: fpm build --profile release
5554

56-
- name: Run test
57-
run: fpm test
55+
- name: Run tests
56+
run: fpm test --profile debug --flag -coverage
57+
58+
- name: Create coverage report
59+
run: |
60+
mkdir -p ${{ env.COV_DIR }}
61+
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base
62+
lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture
63+
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
64+
env:
65+
COV_DIR: build/coverage
66+
67+
- name: Upload coverage report
68+
uses: codecov/codecov-action@v2
69+
with:
70+
files: build/coverage/coverage.info
5871

5972
- name: Build documentation
6073
run: ford ./pyplot-fortran.md

‎README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
![Pyplot-Fortran](media/logo.png)
22
============
33

4-
### Pyplot-Fortran
5-
64
A simple module for generating plots from Fortran using Python's matplotlib.pyplot.
75

6+
### Status
7+
8+
[![GitHub release](https://img.shields.io/github/release/jacobwilliams/pyplot-fortran.svg?style=plastic)](https://github.com/jacobwilliams/pyplot-fortran/releases/latest)
89
![Build Status](https://github.com/jacobwilliams/pyplot-fortran/actions/workflows/CI.yml/badge.svg)
10+
[![codecov](https://codecov.io/gh/jacobwilliams/pyplot-fortran/branch/master/graph/badge.svg?token=BHtd51oUTE)](https://codecov.io/gh/jacobwilliams/pyplot-fortran)
911

1012
### Overview
1113

‎codecov.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
comment:
2+
layout: header, changes, diff, sunburst
3+
coverage:
4+
ignore:
5+
- test
6+
- doc
7+
status:
8+
patch:
9+
default:
10+
target: 20%
11+
project:
12+
default:
13+
target: 70%

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /