Skip to content

Add Zenodo DOI to README #24

Add Zenodo DOI to README

Add Zenodo DOI to README #24

Workflow file for this run

name: TEST
on:
workflow_dispatch: # manual-run
push:
paths:
- '**.f90' # diff in source
jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [9,10] # Version of GFortran we want to use.
python-version: [3.9] # Version of Python we want to use.
env:
FC: gfortran-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
with:
python-version: ${{ matrix.python-version }}
- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
if: contains( matrix.os, 'ubuntu')
run: |
python -m pip install --upgrade pip
pip install numpy matplotlib
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install GFortran on Linux
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt-get install lcov
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }}
- name: Install Gnuplot
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt-get install -y gnuplot
- name: Run tests
run: fpm test --profile debug --flag "-coverage -fcoarray=single"
# ^ needed for assert_m
- name: Create coverage report
run: |
mkdir -p ${{ env.COV_DIR }}
mv ./build/gfortran_*/*/* ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
env:
COV_DIR: build/coverage
- name: Upload coverage report to CODECOV
uses: codecov/codecov-action@v3
with:
files: build/coverage/coverage.info
# Upload coverage-report to CODACY
- name: Upload coverage report to CODACY
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# or
# api-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: build/coverage/coverage.info