Skip to content

Added directory creation check for cases where mcad=False #166

Added directory creation check for cases where mcad=False

Added directory creation check for cases where mcad=False #166

# This workflow will generate and push an updated coverage badge
name: Coverage Badge
on:
push:
branches: [ main ]
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry lock --no-update
poetry install --with test
- name: Generate coverage report
run: |
coverage run -m --source=src pytest -v tests/unit_test.py
- name: Coverage Badge
uses: tj-actions/[email protected]
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v12
id: changed_files
with:
files: coverage.svg
- name: Commit files
if: steps.changed_files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Create Pull Request
if: steps.changed_files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "[Automatic] Coverage Badge Update"