Skip to content

Commit ff9e745

Browse files
authored
New CI workflow (#18)
1 parent 7a48799 commit ff9e745

9 files changed

Lines changed: 74 additions & 123 deletions

File tree

.github/workflows/black.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Continuous Integration
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches: [main, staging]
8+
paths:
9+
- src/relic/**
10+
- tests/**
11+
- .github/workflows/*
12+
- pyproject.toml
13+
- .pylintrc
14+
- MANIFEST.in
15+
- requirements.txt
16+
- test-requirements.txt
17+
18+
pull_request:
19+
branches: [main, staging]
20+
paths:
21+
- src/relic/**
22+
- tests/**
23+
- .github/workflows/*
24+
- pyproject.toml
25+
- .pylintrc
26+
- MANIFEST.in
27+
- requirements.txt
28+
- test-requirements.txt
29+
30+
jobs:
31+
ci:
32+
uses: MAK-Relic-Tool/Workflows/.github/workflows/continuous-integration.yml@main
33+
with:
34+
package: relic.core
35+
runners: '["ubuntu-latest"]' # Should only need to test against python version, not platform
36+
test-path: ./tests

.github/workflows/mypy.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/pylint.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/pytest.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/semver.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ __pycache__/
44

55
# Ignore Pycharm
66
.idea/
7+
# Ignore pycharm coverage cache
8+
.coverage
79

810
#Ignore pytest
911
.pytest_cache/

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
66
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
77
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8-
[![Pytest](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/pytest.yml/badge.svg)](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/pytest.yml)
9-
[![Pylint](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/pylint.yml/badge.svg)](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/pylint.yml)
10-
[![MyPy](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/mypy.yml/badge.svg)](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/mypy.yml)
8+
[![Continuous Integration](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/ci.yml/badge.svg)](https://github.com/MAK-Relic-Tool/Relic-Tool-Core/actions/workflows/ci.yml)
119

1210
### Description
1311
The core library used by other Relic-Tool packages.

pyproject.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,41 @@ relic = "relic.core.cli:CLI.run"
3434
"Bug Tracker" = "https://github.com/MAK-Relic-Tool/Issues-Tracker/issues"
3535
Homepage = "https://github.com/MAK-Relic-Tool/Relic-Tool-Core"
3636

37+
[tool.coverage.html]
38+
directory = ".pycoverage_reports/html"
39+
40+
[tool.coverage.paths]
41+
source = [
42+
"src/"
43+
]
44+
45+
[tool.coverage.report]
46+
# Regexes for lines to exclude from consideration
47+
exclude_also = [
48+
# Don't complain about missing debug-only code:
49+
"def __repr__",
50+
"if self\\.debug",
51+
# Don't complain if tests don't hit defensive assertion code:
52+
"raise AssertionError",
53+
"raise NotImplementedError",
54+
# Don't complain if non-runnable code isn't run:
55+
"if 0:",
56+
"if __name__ == .__main__.:",
57+
# Don't complain about abstract methods, they aren't run:
58+
"@(abc\\.)?abstractmethod"
59+
]
60+
fail_under = 100
61+
ignore_errors = true
62+
omit = [
63+
"tests/*"
64+
]
65+
show_missing = true
66+
skip_covered = true
67+
skip_empty = true
68+
69+
[tool.coverage.run]
70+
branch = true
71+
3772
[tool.mypy]
3873
check_untyped_defs = true
3974
disallow_any_generics = true

0 commit comments

Comments
 (0)