Skip to content

Commit

Permalink
gha updates: fix deps, add coverage, add codecov (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarkentin authored Jan 24, 2024
1 parent 6232672 commit df054e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -27,11 +26,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest ruff
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e '.[lint,test]'
- name: Lint with ruff
run: |
ruff check .
- name: Test with pytest
run: |
pytest
pytest --cov=./ --cov-report=xml
- name: Upload to Codecov
uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ CI = "https://github.com/mwarkentin/skrooge/actions"
skrooge = "skrooge.cli:cli"

[project.optional-dependencies]
test = ["pytest"]
lint = ["ruff"]
scrape = ["pandas", "requests", "lxml"]
test = ["pytest", "pytest-cov"]

[tool.ruff]
exclude = ["skrooge/scraper.py"]

0 comments on commit df054e0

Please sign in to comment.