added example_minimal_case.py to examples #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Install pytest | |
run: | | |
pip install pytest pytest-cov | |
- name: Run tests | |
run: | | |
pytest --cov=gcms_data_analysis --cov-report=html | |
- name: Generate Badge | |
run: | | |
COVERAGE=$(cat docs/htmlcov/index.html | grep -oP '(?<=<td class="right">)[0-9]+\.[0-9]+%' | head -n 1 | tr -d '%') | |
curl "https://img.shields.io/badge/coverage-$COVERAGE-green.svg" > coverage.svg | |
- name: Upload Badge | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-badge | |
path: coverage.svg |