Ver código fonte

ci: fix code coverage

tags/v0.10.0
Jérôme Deuchnord 3 anos atrás
pai
commit
958b84191d
3 arquivos alterados com 13 adições e 9 exclusões
  1. +6
    -0
      .coveragerc
  2. +2
    -6
      .github/workflows/unit-tests.yml
  3. +5
    -3
      Makefile

+ 6
- 0
.coveragerc Ver arquivo

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

+ 2
- 6
.github/workflows/unit-tests.yml Ver arquivo

@@ -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 Ver arquivo

@@ -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:


Carregando…
Cancelar
Salvar