Skip to content

Merge pull request #598 from iKostanOrg/kyu7 #7

Merge pull request #598 from iKostanOrg/kyu7

Merge pull request #598 from iKostanOrg/kyu7 #7

---
name: Codacy Coverage Reporter
# Source:
# https://github.com/codacy/codacy-coverage-reporter-action
on: # yamllint disable-line rule:truthy
push:
branches:
- 'master'
workflow_call:
jobs:
codacy-coverage-reporter:
runs-on: ubuntu-latest
name: codacy-coverage-reporter
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Install pytest, pytest-cov
run: |
pip install pytest
pip install pytest-cov
- name: Generate coverage report
# You must now upload using a token.
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
# yamllint disable rule:line-length
run: |
python -c "import os; print(os.getcwd())"
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
# yamllint enable rule:line-length
- name: Run codacy-coverage-reporter
run: |
export CODACY_ORGANIZATION_PROVIDER=gh \
export CODACY_USERNAME=iKostanOrg \
export CODACY_PROJECT_NAME=codewars
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--api-token ${{ secrets.CODACY_API_TOKEN }} \
--language Python \
--coverage-reports /home/runner/work/codewars/codewars/coverage.xml