Skip to content

Commit

Permalink
Merge pull request #94 from aviolaris/1.11.x
Browse files Browse the repository at this point in the history
Add Codecov workflow
  • Loading branch information
aviolaris authored Jun 16, 2024
2 parents db623a1 + 5e579c4 commit ef07a45
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Codecov
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r app/requirements.txt
pip install pytest-cov
- name: Run tests and collect coverage
run: |
pytest --cov=app --cov-report=xml tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.4.1
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 1 addition & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
from flask_paginate import Pagination
from werkzeug.utils import secure_filename
from flask_session import Session
# pylint: disable-next=import-error
from upd import get_latest_version, update_needed
from .upd import get_latest_version, update_needed

app = Flask(__name__)
app.secret_key = "secret_key"
Expand Down

0 comments on commit ef07a45

Please sign in to comment.