Skip to content

Commit

Permalink
feat: pytest report (#9)
Browse files Browse the repository at this point in the history
* feat: pytest report & setup-python v5

* chore: pytest-html package

* chore: poetry lock

* fix: setup-python v5

* chore: poetry lock

* chore: cleanup order

* chore: pytest-html already in dependencies

* clone workflow from py-kube-downscaler
  • Loading branch information
Fovty authored May 15, 2024
1 parent f26e7e2 commit 7ec3d8f
Show file tree
Hide file tree
Showing 4 changed files with 613 additions and 612 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install poetry
Expand All @@ -23,7 +23,7 @@ jobs:
with:
name: dist
path: dist/*

# Publishing to PyPI. Necessary?
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@master
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ name: Python Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Run pytest
run: poetry run pytest
- name: Run pytest with coverage and generate report
run: poetry run pytest --cov=tests --cov-report=xml tests/
- name: Upload coverage to Cobertura
uses: 5monkeys/cobertura-action@master
with:
path: coverage.xml
minimum_coverage: 70
skip_covered: false
Loading

0 comments on commit 7ec3d8f

Please sign in to comment.