Browse Source

ci: fix code coverage

tags/v0.10.0
Jérôme Deuchnord 3 years ago
parent
commit
958b84191d
3 changed files with 13 additions and 9 deletions
  1. +6
    -0
      .coveragerc
  2. +2
    -6
      .github/workflows/unit-tests.yml
  3. +5
    -3
      Makefile

+ 6
- 0
.coveragerc View File

@@ -0,0 +1,6 @@
[run]
branch = true
source =
kosmorrolib
omit =
tests/*

+ 2
- 6
.github/workflows/unit-tests.yml View File

@@ -35,12 +35,8 @@ jobs:
pipenv lock --pre
pipenv sync --dev
- name: Unit tests
env:
COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make test
pipenv run coveralls --service=github
make legacy-tests

unit-tests:
runs-on: ${{ matrix.os }}
@@ -74,5 +70,5 @@ jobs:
COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make test
make doctests
pipenv run coveralls --service=github

+ 5
- 3
Makefile View File

@@ -2,14 +2,16 @@ black:
pipenv run black kosmorrolib tests

.PHONY: test
tests: legacy-tests
python3 tests.py
tests: legacy-tests doctests

doctests:
pipenv run python3 -m coverage run tests.py

legacy-tests:
unset KOSMORRO_LATITUDE; \
unset KOSMORRO_LONGITUDE; \
unset KOSMORRO_TIMEZONE; \
LANG=C pipenv run python3 -m coverage run -m unittest tests
pipenv run python3 -m coverage run -m unittest tests

.PHONY: build
build:


Loading…
Cancel
Save