Skip to content

Commit

Permalink
Remove codecov usage and use circleci orb (#1295)
Browse files Browse the repository at this point in the history
Signed-off-by: Oscar Cortez <om.cortez.2010@gmail.com>
  • Loading branch information
oscarmcm committed Jul 7, 2023
1 parent ed3daee commit d6f2a90
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: 2.1

orbs:
python: circleci/python@0.2.1
codecov: codecov/codecov@3.2.5

jobs:
hatch:
Expand All @@ -20,6 +21,7 @@ jobs:
steps:
- checkout
- run: pip install hatch && python -m hatch --env test.<<parameters.hatch_env>> run all

lint:
description: "Simple job for linting the pushed code"
docker:
Expand All @@ -28,6 +30,19 @@ jobs:
- checkout
- run: pip install hatch && python -m hatch --env test.py3.9-dj4.0 run lint

coverage:
description: "Job to check the coverage"
docker:
- image: cimg/python:3.9
steps:
- checkout
- run: pip install coverage[toml]
- run: pip install hatch && python -m hatch --env test.py3.9-dj4.0 run all
- run: python -m coverage report -m
- run: python -m coverage xml
- codecov/upload


workflows:
main:
jobs:
Expand Down Expand Up @@ -103,3 +118,4 @@ workflows:
hatch_env: "py3.11-dj4.2"
python_version: "3.11"
- lint
- coverage
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ testproject/testproject/media/*
pip-log.txt

# Unit test / coverage reports
htmlcov/
.coverage
htmlcov
.coverage.*
.tox
.cache
htmlcov
coverage.xml
*.cover

#Eclipse
.project
Expand Down
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ exclude = [
[tool.hatch.envs.default]
dependencies = [
"black>=22.3.0,<22.11",
"codecov",
"coverage[toml]",
"ddt",
"django-functest>=1.2,<1.6",
"flake8>=3.7,<5.1",
Expand All @@ -108,10 +106,6 @@ dependencies = [

[tool.hatch.envs.default.scripts]
# Ignore this entrypoint for now, as it's not fully implemented
cov = [
"coverage run",
"coverage report -m",
]
lint = "flake8 --max-line-length=213 --extend-ignore=E203 --max-complexity=10 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,*/*migrations,testproject src/wiki tests/"
clean-build = [
"rm -fr build",
Expand All @@ -136,8 +130,6 @@ matrix.django.dependencies = [

[tool.hatch.envs.test]
dependencies = [
"codecov",
"coverage[toml]",
"ddt",
"django-functest>=1.2,<1.6",
"pytest-cov",
Expand All @@ -154,7 +146,6 @@ matrix-name-format = "dj{value}"
all = [
"sh -c 'testproject/manage.py makemigrations --check'",
"pytest --cov=wiki tests/ {args}",
"codecov",
]
lint = [
"flake8 --max-line-length=213 --extend-ignore=E203 --max-complexity=10 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,*/*migrations,testproject src/wiki tests/",
Expand All @@ -163,7 +154,6 @@ lint = [
]
clean = [
"rm -fr .tox/",
"rm -f .coverage",
"rm -fr htmlcov/",
]

Expand Down Expand Up @@ -293,6 +283,7 @@ source = [
"src/",
]
omit = [
".DS_Store",
"*/tests/*",
"src/wiki/__about__.py",
]
Expand Down

0 comments on commit d6f2a90

Please sign in to comment.