svgpathtools/.github/workflows/coverage.yml
Workflow config file is invalid. Please check your config file: yaml: line 23: did not find expected key

52 lines
1.7 KiB
YAML

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: |
# coverage run --source=svgpathtools -m unittest discover test
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
echo "web: http-server" > Procfile
mv htmlcov public
# - 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 ???>