Compare commits

...

10 Commits

Author SHA1 Message Date
Andrew Port d4f3bc5631 one more try 2021-10-19 01:01:42 -07:00
Andrew Port 039a5a89a1 try php fix 2021-10-19 00:58:27 -07:00
Andrew Port 46203b0e86 fix workflow file 2021-10-19 00:41:03 -07:00
Andrew Port 14a9d6c5d1 comment out scipy 2021-10-19 00:37:34 -07:00
Andrew Port 1c333273c6 fix heroku deployment 2021-10-19 00:36:58 -07:00
Andrew Port b42653b03f add procfile for heroku 2021-10-19 00:31:29 -07:00
Andrew Port 4d03c4b4e7 force push to heroku 2021-10-18 23:49:35 -07:00
Andrew Port 4c7a6a8592 specify appdir for heroku deployment 2021-10-18 23:45:30 -07:00
Andrew Port d89e2c5f0c add heroku deployment and badge 2021-10-18 23:39:55 -07:00
Andrew Port 4ff68ac17a add action to generate code coverage report 2021-10-18 22:59:54 -07:00
2 changed files with 57 additions and 0 deletions

56
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: Generate Coverage Report
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3
# install deps
- name: Setup python environment
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
# find and run all unit tests
- name: Compute test coverage
run: |
pip install scipy
coverage run --source=svgpathtools -m unittest discover test # run tests again w/ scipy
coverage html # generate static website detailing coverage
echo "coverage: $(coverage report | grep TOTAL | awk '{ print $4 }')" > htmlcov/percentage.yml # get overall percentage
- name: Prepare coverage report for Heroku as fake php site
run: |
echo `web: vendor/bin/heroku-php-apache2 htmlcov/` > Procfile
mv htmlcov/index.html htmlcov/home.html
echo "<?php include_once("./home.html"); ?>" > htmlcov/index.php
echo "{}" > htmlcov/composer.json
# - name: Deploy2
# run: |
# curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Deploy to coverage report to Heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: svgpathtools-coverage
heroku_email: ${{secrets.HEROKU_EMAIL}}
#
# # send report to Codacy
# - name: Report to Codacy
# run: |
# export CODACY_API_TOKEN=${{ secrets.CODACY_API_TOKEN }}
# export CODACY_ORGANIZATION_PROVIDER=gh
# export CODACY_USERNAME=mathandy
# export CODACY_PROJECT_NAME=svgpathtools
# bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r <coverage report file name ???>

View File

@ -3,6 +3,7 @@
[![PyPI](https://img.shields.io/pypi/v/svgpathtools)](https://pypi.org/project/svgpathtools/) [![PyPI](https://img.shields.io/pypi/v/svgpathtools)](https://pypi.org/project/svgpathtools/)
![Build](https://img.shields.io/github/workflow/status/mathandy/svgpathtools/Github%20CI%20Unit%20Testing) ![Build](https://img.shields.io/github/workflow/status/mathandy/svgpathtools/Github%20CI%20Unit%20Testing)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/svgpathtools?color=yellow)](https://pypistats.org/packages/svgpathtools) [![PyPI - Downloads](https://img.shields.io/pypi/dm/svgpathtools?color=yellow)](https://pypistats.org/packages/svgpathtools)
[![Code Coverage](https://img.shields.io/badge/dynamic/yaml?color=9cf&label=coverage&query=%24.DATA.SUBDATA&url=https%3A%2F%2Fsvgpathtools-coverage.herokuapp.com%2Fcoverage.yml)](https://svgpathtools-coverage.herokuapp.com)
# svgpathtools # svgpathtools