Skip to content

Coverage

Coverage #92

Workflow file for this run

name: Coverage
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
permissions:
contents: read
jobs:
update-coverage:
runs-on: [ self-hosted, public, linux, x64 ]
permissions:
contents: write
environment: release
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
token: ${{ secrets.GH_PAT_SECRET }}
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41 # v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Set up Python 3.7
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
with:
python-version: 3.7
- uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: imranismail/setup-kustomize@a76db1c6419124d51470b1e388c4b29476f495f1 # v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pipenv
run: |
python -m pip install --no-cache-dir --upgrade pipenv
- name: Install dependencies
run: |
# remove venv, if exists
pipenv --rm || true
pipenv --python 3.7
pipenv install --dev
pipenv run pip install pytest
- name: Test with pytest
run: |
pipenv run pytest --cov-report term --cov=checkov tests
pipenv run python -m coverage_badge -o coverage.svg -f
git commit -m "Update coverage" coverage.svg || echo "No changes to commit"