diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a33f01c..e00c9c7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,6 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false @@ -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 }} diff --git a/pyproject.toml b/pyproject.toml index cf787bd..89c4792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]