Skip to content

Commit

Permalink
Eh/code test coverage (#95)
Browse files Browse the repository at this point in the history
* Adding code coverage

* Fix coverage testing

* Switch from pytest to coverage

* Adding circleci config

* Adding circleci coverage config

* remove unittest

* com
  • Loading branch information
euxhenh authored Aug 4, 2023
1 parent 2e15fdb commit 470effc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 63 deletions.
42 changes: 13 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
# This config was automatically generated from your source code
# Stacks detected: deps:python:.
version: 2.1

orbs:
python: circleci/python@2
codecov: codecov/[email protected]

jobs:
test-python:
# Install dependencies and run tests
test-api:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.10.2
steps:
- checkout
- python/install-packages
- python/install-packages:
args: pytest
pkg-manager: pip
pypi-cache: false
- run:
name: Run tests
command: pytest --junitxml=junit.xml
- store_test_results:
path: junit.xml
deploy:
# This is an example deploy job, not actually used by the workflow
docker:
- image: cimg/base:stable
steps:
# Replace this with steps to deploy to users
name: Install requirements
command: pip install -r requirements.txt
- run:
name: deploy
command: '#e.g. ./deploy.sh'
name: Run tests and collect coverage
command: coverage run -m pytest --doctest-modules
- codecov/upload

workflows:
build-and-test:
build-test:
jobs:
- test-python
# - deploy:
# requires:
# - test-python

- test-api
34 changes: 0 additions & 34 deletions .github/workflows/unittest.yml

This file was deleted.

0 comments on commit 470effc

Please sign in to comment.