Skip to content

initial commits with new projects (derivation #52

initial commits with new projects (derivation

initial commits with new projects (derivation #52

Workflow file for this run

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