Skip to content

Commit a454c05

Browse files
committed
Setup qlty.sh integration
codeclimate is EOL and replaced by qlty.sh. We update our CI and associated configs to integrate the Commodore GitHub repo with qlty.sh.
1 parent cd6575b commit a454c05

8 files changed

Lines changed: 120 additions & 4 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test coverage with codeclimate
1+
name: Test coverage with codeclimate/qlty.sh
22
on:
33
pull_request:
44
branches:
@@ -7,6 +7,10 @@ on:
77
branches:
88
- master
99

10+
permissions:
11+
contents: read
12+
id-token: write # for qlty.sh coverage upload
13+
1014
jobs:
1115
coverage:
1216
# Only run coverage (which includes the integration test) for PRs which don't originate from a fork
@@ -51,3 +55,8 @@ jobs:
5155
CC_TEST_REPORTER_ID: f9c194f25b65bf9c9413d736386e70d32c128516218768333cd7205e79076506
5256
with:
5357
coverageLocations: coverage.xml:coverage.py
58+
- name: Upload code coverage report to qlty.sh
59+
uses: qltysh/qlty-action/coverage@v1
60+
with:
61+
files: coverage.lcov
62+
oidc: true

.qlty/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
!configs
3+
!configs/**
4+
!hooks
5+
!hooks/**
6+
!qlty.toml
7+
!.gitignore

.qlty/configs/.hadolint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignored:
2+
- DL3008

.qlty/configs/.shellcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source-path=SCRIPTDIR

.qlty/configs/.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
rules:
2+
document-start: disable
3+
quoted-strings:
4+
required: only-when-needed
5+
extra-allowed: ["{|}"]
6+
key-duplicates: {}
7+
octal-values:
8+
forbid-implicit-octal: true

.qlty/qlty.toml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This file was automatically generated by `qlty init`.
2+
# You can modify it to suit your needs.
3+
# We recommend you to commit this file to your repository.
4+
#
5+
# This configuration is used by both Qlty CLI and Qlty Cloud.
6+
#
7+
# Qlty CLI -- Code quality toolkit for developers
8+
# Qlty Cloud -- Fully automated Code Health Platform
9+
#
10+
# Try Qlty Cloud: https://qlty.sh
11+
#
12+
# For a guide to configuration, visit https://qlty.sh/d/config
13+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
14+
config_version = "0"
15+
16+
exclude_patterns = [
17+
"*_min.*",
18+
"*-min.*",
19+
"*.min.*",
20+
"**/.yarn/**",
21+
"**/*.d.ts",
22+
"**/assets/**",
23+
"**/bower_components/**",
24+
"**/build/**",
25+
"**/cache/**",
26+
"**/config/**",
27+
"**/db/**",
28+
"**/deps/**",
29+
"**/dist/**",
30+
"**/extern/**",
31+
"**/external/**",
32+
"**/generated/**",
33+
"**/Godeps/**",
34+
"**/gradlew/**",
35+
"**/mvnw/**",
36+
"**/node_modules/**",
37+
"**/protos/**",
38+
"**/seed/**",
39+
"**/target/**",
40+
"**/templates/**",
41+
"**/testdata/**",
42+
"**/vendor/**", "catalog/", "commodore/cruft/", "compiled/", "dependencies/", "inventory/", "vendor/", ".tox/", "tests/", "tests_cruft/",
43+
]
44+
45+
test_patterns = [
46+
"**/test/**",
47+
"**/spec/**",
48+
"**/*.test.*",
49+
"**/*.spec.*",
50+
"**/*_test.*",
51+
"**/*_spec.*",
52+
"**/test_*.*",
53+
"**/spec_*.*",
54+
]
55+
56+
[smells]
57+
mode = "comment"
58+
59+
[smells.boolean_logic]
60+
threshold = 4
61+
enabled = true
62+
63+
[smells.file_complexity]
64+
threshold = 110
65+
enabled = true
66+
67+
[smells.return_statements]
68+
threshold = 10
69+
enabled = true
70+
71+
[smells.nested_control_flow]
72+
threshold = 4
73+
enabled = true
74+
75+
[smells.function_parameters]
76+
threshold = 10
77+
enabled = true
78+
79+
[smells.function_complexity]
80+
threshold = 16
81+
enabled = true
82+
83+
[smells.duplication]
84+
enabled = true
85+
threshold = 20
86+
87+
[[source]]
88+
name = "default"
89+
default = true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test_integration:
7777

7878
.PHONY: test_coverage
7979
test_coverage:
80-
poetry run pytest -m "not bench" -n auto --cov="commodore" --cov-report xml
80+
poetry run pytest -m "not bench" -n auto --cov="commodore" --cov-report lcov --cov-report xml
8181

8282
.PHONY: test_gen_golden
8383
test_gen_golden:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[![PyPI release](https://github.com/projectsyn/commodore/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/projectsyn/commodore/actions/workflows/publish-pypi.yml)
55
[![GitHub Release](https://img.shields.io/github/v/release/projectsyn/commodore.svg)](https://github.com/projectsyn/commodore/releases)
66
[![PyPI Release](https://img.shields.io/pypi/v/syn-commodore?color=blue)](https://pypi.org/project/syn-commodore)
7-
[![Maintainability](https://api.codeclimate.com/v1/badges/abb63d489a6d6e01939d/maintainability)](https://codeclimate.com/github/projectsyn/commodore/maintainability)
8-
[![Test Coverage](https://api.codeclimate.com/v1/badges/abb63d489a6d6e01939d/test_coverage)](https://codeclimate.com/github/projectsyn/commodore/test_coverage)
7+
[![Maintainability](https://qlty.sh/gh/projectsyn/projects/commodore/maintainability.svg)](https://qlty.sh/gh/projectsyn/projects/commodore)
8+
[![Code Coverage](https://qlty.sh/gh/projectsyn/projects/commodore/coverage.svg)](https://qlty.sh/gh/projectsyn/projects/commodore)
99

1010
This repository is part of Project Syn.
1111
For documentation on Project Syn and this component, see https://syn.tools.

0 commit comments

Comments
 (0)