Skip to content

Commit

Permalink
GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed Apr 11, 2023
1 parent adcfabd commit 4398e30
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- python >=3.7,<3.10
- biobb_common ==3.9.0
- biobb_common ==4.0.0
- gfortran ==8.5.0
- flexserv ==1.0.2
- pcasuite ==1.0.0
Expand Down
46 changes: 40 additions & 6 deletions .github/workflows/linting_and_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
os: [self-hosted]
python-version: ["3.7", "3.8", "3.9"]
runs-on: self-hosted
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand All @@ -43,8 +43,14 @@ jobs:
python=${{ matrix.python-version }}
pytest
pytest-cov
pytest-html
flake8
pip
- name: Install genbadge from pip
shell: bash -l {0} # necessary for conda env to be active
run: pip install genbadge[all]

- name: List installed package versions
shell: bash -l {0} # necessary for conda env to be active
run: micromamba list
Expand All @@ -57,9 +63,17 @@ jobs:
# Workflow fails: Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Create directory for flake8 reports
mkdir -p ./reports/flake8
# Exit-zero treats all errors as warnings, workflow will not fail:
flake8 . --exclude=docs --ignore=C901,E226 --count --exit-zero --max-complexity=10 --max-line-length=999 --statistics
flake8 . --exclude=docs --ignore=C901,E226 --count --exit-zero --max-complexity=10 --max-line-length=999 --statistics --format=html --htmldir=./reports/flake8/ --tee --output-file=./reports/flake8/flake8stats.txt
- name: Generate Flake8 badge
shell: bash -l {0} # necessary for conda env to be active
run: |
genbadge flake8 --name "Flake8" --input-file ./reports/flake8/flake8stats.txt --output-file ./reports/flake8/flake8badge.svg
- name: Checkout biobb_common
uses: actions/checkout@v3
Expand All @@ -72,13 +86,33 @@ jobs:
run: |
# Ignoring docker and singularity tests
export PYTHONPATH=.:./biobb_common:$PYTHONPATH
# Create directory for tests reports
mkdir -p ./reports/junit
# Production one
pytest biobb_flexserv/test/unitests/ --cov=./ --cov-report=xml --ignore-glob=*container.py --ignore-glob=*pmemd*
pytest biobb_flexserv/test/unitests/ --cov=./ --cov-report=xml --junit-xml=./reports/junit/junit.xml --html=./reports/junit/report.html
- name: Generate Tests badge
shell: bash -l {0} # necessary for conda env to be active
run: |
genbadge tests --name "Tests" --input-file ./reports/junit/junit.xml --output-file ./reports/junit/testsbadge.svg
- name: Generate Coverage badge
shell: bash -l {0} # necessary for conda env to be active
run: |
# Create directory for flake8 reports
mkdir -p ./reports/coverage
coverage xml -o ./reports/coverage/coverage.xml
coverage html -d ./reports/coverage/
genbadge coverage --name "Coverage" --input-file ./reports/coverage/coverage.xml --output-file ./reports/coverage/coveragebadge.svg
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Publish coverage report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
folder: ./reports

- name: Restore .bash_profile
run: cp ~/.bash_profile_orig ~/.bash_profile
Expand Down
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
[![](https://github.com/bioexcel/biobb_flexserv/actions/workflows/linting_and_testing.yml/badge.svg)](https://github.com/bioexcel/biobb_flexserv/actions/workflows/linting_and_testing.yml)
[![](https://codecov.io/gh/bioexcel/biobb_flexserv/branch/master/graph/badge.svg?token=1WU81J2VLP)](https://codecov.io/gh/bioexcel/biobb_flexserv)
[![](https://readthedocs.org/projects/biobb-flexserv/badge/?version=latest)](https://biobb-flexserv.readthedocs.io/en/latest/?badge=latest)

[![](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](https://anaconda.org/bioconda/biobb_flexserv)
[![](https://img.shields.io/badge/docker-Quay.io-blue)](https://quay.io/repository/biocontainers/biobb_flexserv?tab=tags)
[![](https://img.shields.io/badge/singularity-GalaxyProject-blue)](https://depot.galaxyproject.org/singularity/biobb_flexserv:3.9.0--pyhdfd78af_0)

[![](https://img.shields.io/github/v/tag/bioexcel/biobb_flexserv?label=Version)](https://GitHub.com/bioexcel/biobb_flexserv/tags/)
[![](https://img.shields.io/pypi/v/biobb-flexserv.svg?label=Pypi)](https://pypi.python.org/pypi/biobb-flexserv/)
[![](https://img.shields.io/conda/vn/bioconda/biobb_flexserv?label=Conda)](https://anaconda.org/bioconda/biobb_flexserv)
[![](https://img.shields.io/conda/dn/bioconda/biobb_flexserv?label=Conda%20Downloads)](https://anaconda.org/bioconda/biobb_flexserv)
[![](https://img.shields.io/badge/Docker-Quay.io-blue)](https://quay.io/repository/biocontainers/biobb_flexserv?tab=tags)
[![](https://img.shields.io/badge/Singularity-GalaxyProject-blue)](https://depot.galaxyproject.org/singularity/biobb_flexserv:4.0.0--pyhdfd78af_0)

[![](https://img.shields.io/badge/OS-Unix%20%7C%20MacOS-blue)](https://github.com/bioexcel/biobb_flexserv)
[![](https://img.shields.io/pypi/pyversions/biobb-flexserv.svg?label=Python%20Versions)](https://pypi.org/project/biobb-flexserv/)
[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![](https://img.shields.io/badge/Open%20Source%3f-Yes!-blue)](https://github.com/bioexcel/biobb_flexserv)

[![](https://readthedocs.org/projects/biobb-flexserv/badge/?version=latest&label=Docs)](https://biobb-flexserv.readthedocs.io/en/latest/?badge=latest)
[![](https://img.shields.io/website?down_message=Offline&label=Biobb%20Website&up_message=Online&url=https%3A%2F%2Fmmb.irbbarcelona.org%2Fbiobb%2F)](https://mmb.irbbarcelona.org/biobb/)
[![](https://img.shields.io/badge/Youtube-tutorial-blue?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=ou1DOGNs0xM)
[![](https://zenodo.org/badge/DOI/10.1038/s41597-019-0177-4.svg)](https://doi.org/10.1038/s41597-019-0177-4)
[![](https://img.shields.io/endpoint?color=brightgreen&url=https%3A%2F%2Fapi.juleskreuer.eu%2Fcitation-badge.php%3Fshield%26doi%3D10.1038%2Fs41597-019-0177-4)](https://www.nature.com/articles/s41597-019-0177-4#citeas)

[![](https://docs.bioexcel.eu/biobb_flexserv/junit/testsbadge.svg)](https://docs.bioexcel.eu/biobb_flexserv/junit/report.html)
[![](https://docs.bioexcel.eu/biobb_flexserv/coverage/coveragebadge.svg)](https://docs.bioexcel.eu/biobb_flexserv/coverage/)
[![](https://docs.bioexcel.eu/biobb_flexserv/flake8/flake8badge.svg)](https://docs.bioexcel.eu/biobb_flexserv/flake8/)
[![](https://img.shields.io/github/last-commit/bioexcel/biobb_flexserv?label=Last%20Commit)](https://github.com/bioexcel/biobb_flexserv/commits/master)
[![](https://img.shields.io/github/issues/bioexcel/biobb_flexserv.svg?color=brightgreen&label=Issues)](https://GitHub.com/bioexcel/biobb_flexserv/issues/)


# biobb_flexserv
Expand Down

0 comments on commit 4398e30

Please sign in to comment.