Update deploy_release_to_PyPI.yaml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Update Coverage Report | |
on: | |
push: | |
branches: [ "master" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
update_coverage_report: | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: [ubuntu-latest] | |
environment: Dev | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest pytest-responses coverage genbadge defusedxml | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
pip install -e . | |
- name: Test with pytest | |
run: | | |
coverage run -m pytest | |
- name: Build Coverage Report | |
run: | | |
coverage html -d ./htmlcov | |
- name: Generate Coverage Badge | |
run: | | |
coverage xml | |
genbadge coverage -i ./coverage.xml -o ./htmlcov/coveragecoverage-badge.svg | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './htmlcov' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |