Skip to content

Commit

Permalink
Merge pull request #7 from ADR-007/feature/show-code-coverage
Browse files Browse the repository at this point in the history
Add different python versions to CI
  • Loading branch information
ADR-007 authored Sep 22, 2021
2 parents 4d1832c + 13008fb commit b5854d2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
22 changes: 16 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1

jobs:

Expand All @@ -7,7 +7,11 @@ jobs:
build-and-test:
# Our environment, Python 3.6.14
docker:
- image: cimg/python:3.6.14
- image: cimg/python:<<parameters.python>>

parameters:
python:
type: string

# The steps for our build-and-test
steps:
Expand Down Expand Up @@ -57,7 +61,7 @@ jobs:

# Same environment
docker:
- image: circleci/python:3.6.8
- image: cimg/python:3.6.11
steps:

# Gets the code
Expand All @@ -72,12 +76,17 @@ jobs:
# In the workflows section, we specify when we want to run the jobs defined
workflows:
version: 2

# The build-and-test we will run EVERYTIME a piece of code changes
build-and-test-workflow:
jobs:
- build-and-test
- build-and-test:
python: '3.6'
- build-and-test:
python: '3.7'
- build-and-test:
python: '3.8'
- build-and-test:
python: '3.9'

# The deployment workflow publishes the package
deployment-workflow:
Expand All @@ -90,6 +99,7 @@ workflows:
only: /v[0-9]+(\.[0-9]+)*/
branches:
ignore: /.*/
python: '3.6.11'

# Runs the deployment job, just with the tags as well
- deployment:
Expand Down
17 changes: 16 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ classifiers = [
"Topic :: Software Development :: Testing :: Mocking",
"Topic :: Software Development :: Testing :: Unit",
"Topic :: Internet :: WWW/HTTP",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]

[tool.poetry.dependencies]
Expand All @@ -21,9 +26,12 @@ requests = "^2.22"
responses = "^0.14.0"

[tool.poetry.dev-dependencies]
coverage = "^5.5"
coverage = {version = "^5.5", extras = ["toml"]}
coveralls = "^3.2.0"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

[tool.coverage.run]
relative_files = true

0 comments on commit b5854d2

Please sign in to comment.