Skip to content

Update dependency installation in coverage workflow #3

Update dependency installation in coverage workflow

Update dependency installation in coverage workflow #3

Workflow file for this run

name: Coverage Badge
on:
push:
branches:
- main
- dev
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --with dev
pip install genbadge coverage
- name: Run tests and generate coverage report
run: |
coverage run -m pytest
coverage xml -o reports/coverage/coverage.xml
- name: Generate coverage badge
run: genbadge coverage -i reports/coverage/coverage.xml -o coverage-badge.svg
- name: Upload coverage badge to repo
uses: actions/upload-artifact@v3
with:
name: coverage-badge
path: coverage-badge.svg