Skip to content

Commit 2ce872d

Browse files
authored
Merge pull request #31 from IBM/cc
Migrating to CodeClimate
2 parents b2f020b + b449194 commit 2ce872d

File tree

7 files changed

+31
-71
lines changed

7 files changed

+31
-71
lines changed

.github/workflows/main.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
2828
strategy:
29+
max-parallel: 2
2930
matrix:
3031
python-version: [3.6, 3.7, 3.8, 3.9]
3132
steps:
@@ -41,7 +42,16 @@ jobs:
4142
run: make setup
4243

4344
- name: running unit tests
44-
run: make test-unit
45+
run: tox
46+
47+
- name: publishing code coverage report to codeclimate
48+
env:
49+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
50+
run: |
51+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
52+
chmod +x ./cc-test-reporter
53+
./cc-test-reporter before-build
54+
build/publishCodeCoverage.sh
4555
4656
- name: running integration tests
4757
env:

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![PyPi](https://badge.fury.io/py/ibm-scc.svg)](https://pypi.python.org/pypi/ibm-scc/)
66
[![PyPi](https://img.shields.io/pypi/dw/ibm-scc.svg)](https://pypi.python.org/pypi/ibm-scc/)
77
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8-
[![codecov](https://codecov.io/gh/IBM/scc-python-sdk/branch/main/graph/badge.svg?token=U0DC9HWWOA)](https://codecov.io/gh/IBM/scc-python-sdk)
8+
[![Test Coverage](https://api.codeclimate.com/v1/badges/a87748d845549d045483/test_coverage)](https://codeclimate.com/github/IBM/scc-python-sdk/test_coverage)
99
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
1010
# IBM Cloud Security & Compliance Center Python SDK Version 1.1.2
1111

build/publishCodeCoverage.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# This script will publish code coverage info for a build of the master branch
4+
# or a tagged release.
5+
6+
7+
printf ">>>>> Publishing code coverage info\n"
8+
9+
./cc-test-reporter format-coverage --prefix "/${pwd}/" --input-type coverage.py --output coverage.json -d
10+
./cc-test-reporter upload-coverage --input coverage.json -d

codecov.yml

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

requirements-dev.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# test dependencies
2-
codecov>=2.1.0,<3.0.0
2+
tox-gh-actions
33
coverage>=4.5.4
44
pylint>=2.6.0,<3.0.0
55
pytest>=6.2.1,<7.0.0
66
pytest-cov>=2.2.1,<3.0.0
77
pytest-rerunfailures>=3.1
88
responses>=0.12.1,<1.0.0
99
tox>=3.2.0,<4.0.0
10-

tox.ini

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[tox]
22
envlist = py37-lint, py36, py37, py38, py39
33

4+
[gh-actions]
5+
python =
6+
3.6: py36
7+
3.7: py37
8+
3.8: py38
9+
3.9: py39
10+
411
[testenv:py37-lint]
512
basepython = python3.7
613
deps = pylint
@@ -9,8 +16,7 @@ commands = pylint --rcfile=.pylintrc ibm_scc test/unit test/integration examples
916
[testenv]
1017
passenv = TOXENV CI TRAVIS* ACCOUNT_ID PROVIDER_ID
1118
commands =
12-
py.test --reruns 3 --cov=ibm_scc {posargs} test/unit
13-
codecov -e TOXENV
19+
py.test --reruns 3 --cov=ibm_scc {posargs} test/unit --cov-report=xml
1420
deps =
1521
-r{toxinidir}/requirements.txt
1622
-r{toxinidir}/requirements-dev.txt

0 commit comments

Comments
 (0)